No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
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