ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • maven-eclipse error
    카테고리 없음 2009. 2. 27. 18:03

    eclipse에서 maven으로 compile하니 아래와 같은 error에 직면했다.

    6/25/07 1:15:44 PM CDT: ERROR mojo-execute : compiler:compile : Compilation failure
    Unable to locate the Javac Compiler in:
    C:\Program Files\Java\j2re1.4.2_14\..\lib\tools.jar
    Please ensure you are using JDK 1.4 or above and
    not a JRE (the com.sun.tools.javac.Main class is required).
    In most cases you can change the location of your Java
    installation by setting the JAVA_HOME environment variable.

    이럴땐 eclipse.ini 파일에 다음을 추가한다

    -vm [jdk path]\bin




    아래는 참고한 외국인들 메일 내용

    > > this is probably a jre instead of jdk. so eclipse gets started
    with jre and so maven plugin starts maven through jre.
    > >
    > > there is a start-parameter for eclipse where you can set the runntime:
    > > -vm "C:\Program Files\Java\jdk1.5.0_11"
    > > -vm "C:\Program Files\Java\jdk1.5.0_11\bin\java.exe"

    대충 에러 원인은 jdk대신 jre로 빌드하기 때문이다.
    이클립스가 시작될때 매이븐 플러그인이 이클립스의 jre경로를 참고해 빌드하기 때문에 ..어쩌구..

Designed by Tistory.