1. 程式人生 > >解決案例No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

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

maven install 初始化失敗

錯誤狀況:

師兄師姐說 .............................................. SUCCESS [  0.614 s]
[INFO] sxsj-common ........................................ SUCCESS [  3.347 s]
[INFO] sxsj-pojo .......................................... FAILURE [  0.258 s]
[INFO] sxsj-mapper ........................................ SKIPPED
[INFO] sxsj-service ....................................... SKIPPED
[INFO] sxsj-mini-api ...................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.607 s
[INFO] Finished at: 2018-09-01T19:06:03+08:00
[INFO] Final Memory: 33M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project sxsj-pojo: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]

記得專案修改為jre路徑哦!!

然後重啟就ok了