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

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project miweb: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]

意思是JDK有問題,Windows--->Preferences-->搜索框輸入install,找到Installed JREs

從上圖中可以看出,引用的是jre而不是JDK,換成JDK

然後在打包就可以了:

打包方式:clean package -Dmaven.test.skip=true
原文鏈接:https://blog.csdn.net/muyeju/article/details/103167274

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章