No compiler is provided in this environment. Perhaps you are running on a JR


maven編譯項目時出錯,提示信息如下:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project springside-core: Compilation failure

[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

[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

 

解決方案:

1,在eclipse的菜單中,進入 Window > Preferences > Java > Installed JREs ->Add ->Standard VM

jre home 選擇jdk安裝目錄,然后選中

 

 

 2,右鍵項目build path

 

 

 

jdk是開發工具 

jre是運行環境 

編譯用的都是jdk的resources嘛,開發時不能只有運行庫,應該具備開發庫,就是這個意思。

另外***is not a servlet的錯

 

 servlet和jsp的作用域加上就可以

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM