【发布时间】:2018-08-25 02:38:21
【问题描述】:
使用以下命令时出现以下错误
mvn clean install package
错误
No compiler is provided in this environment. Perhaps you are running
on a JRE rather than a JDK?
我已经尝试了已经在线提供的解决方案,但没有一个有效,我在我的 Eclipse 上安装的 JRE 中选择了我的 JDK 路径。 我正在使用 Ubuntu 16.04。有人可以帮忙吗?
我已经尝试过No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?给出的解决方案 但这没有帮助。我已经正确选择了我的 JDK 路径
【问题讨论】:
-
我已经尝试过该解决方案,但不起作用
-
你能分享你的 pom.xml 文件吗?或者你验证你已经添加了编译器插件。
-
@HassanMudassir 我确实通过
org.springframework.boot spring-boot-maven-plugin 添加了编译器插件 artifactId> -
为编译器添加java版本。
将 ${java.version} 替换为您使用的实际版本org.apache.maven.plugins maven-compiler-plugin 3.6.1 ${java.version } ${java.version}
标签: java eclipse maven spring-boot