简体   繁体   English

此环境中未提供编译器。 - Eclipse - Maven - java-8-openjdk - Xubuntu

[英]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。

  1. I am using JDK not JRE: 我使用JDK而不是JRE:

    构建路径截图。

    已安装的JRE  - >执行环境截图

    Java is located at **/usr/lib/jvm/java-8-openjdk-amd64/** . Java位于**/usr/lib/jvm/java-8-openjdk-amd64/**

  2. The class with main method compiles and runs without a problem. 具有main方法的类编译并运行没有问题。

  3. I was able to build before without any problems. 我之前没有遇到任何问题。
  4. The runtime version of Eclipse: Eclipse的运行时版本:

     java.runtime.version=1.8.0_91-8u91-b14-0ubuntu4~16.04.1-b14 
  5. In 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.

相关问题 Eclipse/Maven 错误:“此环境中未提供编译器” - Eclipse/Maven error: "No compiler is provided in this environment" 使gcj识别Java-8-openjdk库 - Getting gcj to recognize java-8-openjdk libraries 此环境中不提供编译器。 执行 mvn clean package 时 - No compiler is provided in this environment. When execute mvn clean package Maven(命令行):此环境不提供编译器 - Maven (commandline): No compiler is provided in this environment Yosemite上的Maven安装失败:此环境中未提供编译器 - Maven installation failure on Yosemite: No compiler is provided in this environment Maven 包错误:此环境中没有提供编译器 - Maven package error: No compiler is provided in this environment 此环境中不提供编译器。 也许您在 JRE 而不是 JDK 上运行? - 但是选择了jdk - No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? - but jdk selected Mac os 大苏尔 | 此环境中不提供编译器。 也许您在 JRE 而不是 JDK 上运行? - Mac os Big Sur | No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? 此环境中未提供编译器。 也许您在 JRE 而不是 JDK 上运行? - No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? 此环境中未提供编译器。 也许您在 JRE 而不是 JDK 上运行? 在视觉工作室代码中 - No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? in visual studio code
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM