Java is located at **/usr/lib/jvm/java-8-openjdk-amd64/**. The class with main method compiles and runs without a problem. I was able to build "/>
  简体   繁体   中英

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.

  1. I am using JDK not JRE:

    构建路径截图。

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

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

  2. The class with main method compiles and runs without a problem.

  3. I was able to build before without any problems.
  4. The runtime version of 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 .

What am I missing here ? I have configured correct path. I have JDK. I did builds before and yet Maven is failing now.

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.

You should also verify that tools.jar exists under Windows->Preferences->Installed JREs, and if it is not, add it manually.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM