解决案例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]

 

解决案例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?

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

记得项目修改为jre路径哦!!

然后重启就ok了