[英]No compiler is provided in this environment. - Eclipse - Maven - java-8-openjdk - Xubuntu
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
I use Eclipse, Maven and java8-openjdk. 我使用Eclipse,Maven和java8-openjdk。
I am using JDK not JRE: 我使用JDK而不是JRE:
Java is located at **/usr/lib/jvm/java-8-openjdk-amd64/**
. Java位于
**/usr/lib/jvm/java-8-openjdk-amd64/**
。
The class with main
method compiles and runs without a problem. 具有
main
方法的类编译并运行没有问题。
The runtime version of Eclipse: Eclipse的运行时版本:
java.runtime.version=1.8.0_91-8u91-b14-0ubuntu4~16.04.1-b14
pom.xml
, I have Maven compiler plugin, with version 3.5.1
, source and target values 1.8
. pom.xml
,我有Maven编译器插件,版本3.5.1
,源和目标值1.8
。 What am I missing here ? 我在这里错过了什么? I have configured correct path.
我已经配置了正确的路径。 I have JDK.
我有JDK。 I did builds before and yet Maven is failing now.
我之前做过构建,但Maven现在失败了。
Please let me know how to start about finding the root cause and also let me know if any more information is needed. 请让我知道如何找到根本原因,并告诉我是否需要更多信息。 Thanks.
谢谢。
Seems like maven-compiler-plugin
version 3.x is using tools.jar
for compilation rather then javac
, please make sure this jar is present under $JAVA_HOME/lib
and eclipse has permissions to access it. 看起来像
maven-compiler-plugin
3.x版正在使用tools.jar
进行编译而不是javac
,请确保这个jar存在于$JAVA_HOME/lib
,eclipse有权访问它。
You should also verify that tools.jar
exists under Windows->Preferences->Installed JREs, and if it is not, add it manually. 您还应验证在Windows-> Preferences-> Installed JRE下是否存在
tools.jar
,如果不存在,请手动添加。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.