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

时间:2020-07-15 11:04:08   收藏:0   阅读:40

1、错误提示:
  No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

 

2、原因分析:
  从翻译可知 Eclipse 不知道是用 JRE 还是使用 JDK 对源码进行编译了;

 

3、解决办法:
  eclipse 是使用 JDK 对源码进行编译的,JRE 是字节码的运行环境,无法编译 Java 源码,故我们将配置的 JRE 换成 JDK 即可。

 

4、附详细的异常提示:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project boss-common: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

原文:https://www.cnblogs.com/hapday/p/13303785.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!