简体   繁体   中英

Eclipse/Ant build failure - com.sun.tools.javac.Main is not on the classpath

I get the following error when I try to build my project in eclipse using Ant. Searching for solutions suggests that JAVA_HOME should point to JDK instead of JRE and there should be a tool.jar in JAVA_HOME/lib folder. As shown in the following error message, JAVA_HOME is pointing to the JDK, but it doesn't have tools.jar in the lib folder. Is it correct to assume Oracle is no longer shipping tools.jar with the JDK? Where can I find com.sun.tools.javac.Main ?

com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "C:\Program Files\Java\jdk1.8.0_73"

Thank you

Is it correct to assume Oracle is no longer shipping tools.jar with the JDK?

No, tools.jar should be present in the latest JDK8 installation. It seems your JDK installation is incomplete. Try re-doing a fresh install.

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