JAVA

[Java] Maven 빌드시 Unable to locate the Javac Compiler in 오류메시지

ShineWithMe 2012. 3. 12. 16:19


증상

Eclipse 사에서 M2e Maven install 을 수행했을시 빌드 실패 와 함께 'Unable to locate the Javac Compiler in' 에러 출력

원인

Eclipse 의 JRE 버전과 프로젝트에서 사용하는 JRE 버전이 상이하여 발생

Eclipse 는 C:\programs\java\jre 를 참조

프로젝트는 %JAVA_HOME%\jre 를 참조

하여 서로 틀린 jre 디렉토리를 사용함으로 에러 발생

 해결

Eclipse의 jre를 %JAVA_HOME%/jre 로 변경

Windows -> Preferences -> Installed JREs 에서 Location을 %JAVA_HOME%/jre 로 변경