2011-02-25 5 views
0

스프링을 사용하여 development.And를 사용하고 있습니다. eclipse.Earlier를 사용하고 있습니다. 프로젝트가 성공적으로 빌드되었지만 일부 패키지에서 내 애플리케이션에 파일을 더 붙여 넣기 때문에 오류가 발생했습니다. 내가 "Maven Package"라는 이름으로 실행을 할 때. 나는 왜이 오류가 몇 차례에 걸쳐 발생하는지 이해하지 못하고있다. 아무도 내 문제를 해결하는 데 도움이되지 못한다. 내가 받는다는 패키지로프로젝트를 빌드하는 동안 maven 패키지 (빌드 오류)

[INFO] Scanning for projects... 
[INFO]                   
[INFO] ------------------------------------------------------------------------ 
[INFO] Building HeyLets 0.8-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ HeyLets --- 
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! 
[INFO] Copying 2 resources 
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ HeyLets --- 
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! 
[INFO] Compiling 1 source file to D:\temp\temp_wsp\HeyLetsNew\target\classes 
[INFO] ------------------------------------------------------------- 
[ERROR] COMPILATION ERROR : 
[INFO] ------------------------------------------------------------- 
[ERROR] Unable to locate the Javac Compiler in: 
    C:\Program Files\Java\jre6\..\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. 
[INFO] 1 error 
[INFO] ------------------------------------------------------------- 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 2.156s 
[INFO] Finished at: Fri Feb 25 11:04:37 IST 2011 
[INFO] Final Memory: 3M/15M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project HeyLets: Compilation failure 
[ERROR] Unable to locate the Javac Compiler in: 
[ERROR] C:\Program Files\Java\jre6\..\lib\tools.jar 
[ERROR] Please ensure you are using JDK 1.4 or above and 
[ERROR] not a JRE (the com.sun.tools.javac.Main class is required). 
[ERROR] In most cases you can change the location of your Java 
[ERROR] installation by setting the JAVA_HOME environment variable. 
[ERROR] -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException 

감사를 실행 말할 때 나는 오류를 다음 얻을

, 인 Yogesh 차우

+0

JAVA_HOME은 (으)로 설정되어 있습니까? – Raghuram

+0

JAVA_HOME이 (가) C : \ Program Files \ Java \ jdk1.6.0_23을 가리키고 있습니다. – user469999

답변

0

은 아마 당신은 this 스레드에서 논의 된 같은 문제에 직면하고있다. 그렇다면 해결 방법이 스레드에서도 제안됩니다.

1

Raghuram이 지적한 스레드의 지침에 따라 문제가 해결되었습니다. 사용 된 JRE를 JDK 내부의 것으로 변경해야합니다.

환경 설정/Java/Installed JREs로 이동하여 "C:\Program Files\Java\jdk1.6.0_27\jre"또는 그와 유사한 위치에 하나를 추가하십시오. "C:\Program Files\Java\jre6"중 하나를 제거하십시오.

Maven 스크립트를 다시 실행하십시오. 보시다시피 문제가 해결되었습니다!

1

[ERROR]에서 javac의 컴파일러를 찾을 수 없습니다 : C : \의 ProgramFiles 자바 \ \ JRE6 .. \ lib 디렉토리 \

사용 tools.jar를 JDK는 JRE : C : \ 프로그램 파일 \ Java \ jdk1.6.0_27 \ jre ($ BaseDir)

이제 경로 jre \ .. \ lib \ tools.jar가 맞습니다. (.. 평균 상위 디렉토리)

$ BASEDIR \ JRE \ .. \ lib 디렉토리 \ 동일한 $ BASEDIR tools.jar를 \ lib 디렉토리 \ tools.jar를 윈도우로 이동 이클립스에서

-> 환경 설정 -> 자바 -> 설치된 JRE

"C : \ Program Files \ Java \ jdk1.6.0_27 \ jre"또는 이와 비슷한 위치를 추가하거나 변경하십시오.

관련 문제