No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK 오류

1842 단어 이상 처리
명령줄에서 컴파일(mvn compile) maven 프로젝트를 실행할 때 [ERROR] No compiler is providedin this environment를 알립니다.Perhaps you are running on a JRE rather than a JDK?오류 정보, 구체적으로 다음과 같다.
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.787 s
[INFO] Finished at: 2018-03-11T15:33:10+08:00
[INFO] Final Memory: 8M/154M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project simple: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR]
[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

처음에 마븐 프로젝트를 시작했는데 인터넷에서 자료를 검색한 결과 모두 eclipse를 바탕으로 개발된 것이고 저는 mvn을 직접 사용하여 명령행에서 실행한 것이기 때문에 제 상황에 적합하지 않지만 제 생각에도 jdk의 설정 문제입니다.나중에 jdk의 설정을 검사했는데 path의 내용만 설정했고 JAVA_를 설정하지 않았습니다.HOME, 그래서 나는 설정을 해 보았고, 명령행 창을 다시 열어 명령을 다시 실행했는데, 문제가 해결된 것을 발견했다.원래 JAVA가 설정되어 있지 않았어요.HOME 이유, JAVA_HOME은 eclipse 도구를 사용하여 개발할 수 있지만 가장 기본적인 명령줄을 사용하면 설정이 필요합니다.

좋은 웹페이지 즐겨찾기