关于Maven项目install时出现No compiler is provided in this environment的处理
关于Maven项目build时出现No compiler is provided in this environment的处理
新配置的Eclipse环境,运行现有项目没问题,一日,从svn上检出了一批 maven 项目,结果发现 无法执行 run as maven install 命令,提示
码节选: [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] --------------------- 作者:Code_buger 来源:CSDN 原文:https://blog.csdn.net/lslk9898/article/details/73836745 版权声明:本文为博主原创文章,转载请附上博文链接!
一番折腾,最终发现,原来,在 Eclipse的 Preference——Java——Installed JRES 配置中 将java运行环境配成了 jre的目录,改成 jdk 的目录,再运行项目就可以了。