关于maven项报:[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rath

关于eclipse创建maven工后进行测试报[ERROR] No compiler is provided in 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: 1.436 s
[INFO] Finished at: 2017-06-28T11:16:07+08:00
[INFO] Final Memory: 10M/151M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project manage: 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改为自己电脑安装的jre即可:
右键点击项目名称—>build path–>configure build path
然后:
关于maven项报:[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rath_第1张图片
关于maven项报:[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rath_第2张图片

你可能感兴趣的:(Javaweb)