[英]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.当我尝试使用 Ant 在 Eclipse 中构建我的项目时出现以下错误。 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.搜索解决方案表明 JAVA_HOME 应该指向 JDK 而不是 JRE,并且在 JAVA_HOME/lib 文件夹中应该有一个 tool.jar。 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.如以下错误消息所示,JAVA_HOME 指向 JDK,但它在 lib 文件夹中没有 tools.jar。 Is it correct to assume Oracle is no longer shipping tools.jar with the JDK?假设 Oracle 不再随 JDK 一起提供 tools.jar 是否正确? Where can I find com.sun.tools.javac.Main ?我在哪里可以找到 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?假设 Oracle 不再随 JDK 一起提供 tools.jar 是否正确?
No, tools.jar should be present in the latest JDK8 installation.不,tools.jar 应该存在于最新的 JDK8 安装中。 It seems your JDK installation is incomplete.看来你的JDK安装不完整。 Try re-doing a fresh install.尝试重新进行全新安装。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.