简体   繁体   English

Eclipse/Ant 构建失败 - com.sun.tools.javac.Main 不在类路径上

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

相关问题 com.sun.tools.javac.Main不在类路径中 - com.sun.tools.javac.Main is not on the classpath Unable to find a javac compiler com.sun.tools.javac.Main is not on the classpath 错误 - Unable to find a javac compiler com.sun.tools.javac.Main is not on the classpath error 在Ubuntu上安装Jetty,获取com.sun.tools.javac.Main不在类路径上 - Installing Jetty on Ubuntu, getting com.sun.tools.javac.Main is not on the classpath Hadoop“无法找到或加载主类com.sun.tools.javac.Main” - Hadoop “Could not find or load main class com.sun.tools.javac.Main” 编译器错误 - “错误:无法找到或加载主类 com.sun.tools.javac.Main” - Compiler Error - 'Error: Could not find or load main class com.sun.tools.javac.Main' 无法找到或加载主类com.sun.tools.javac.Main hadoop mapreduce - Could not find or load main class com.sun.tools.javac.Main hadoop mapreduce Hadoop 编译错误:无法找到或加载主类 com.sun.tools.javac.Main - Hadoop Compilation Error: Could not find or load main class com.sun.tools.javac.Main 字数统计 hadoop 程序:错误:无法找到或加载主类 com.sun.tools.javac.Main - Word Count hadoop program: Error: Could not find or load main class com.sun.tools.javac.Main Java:尝试编译Hadoop程序时找不到com.sun.tools.javac.Main - Java: com.sun.tools.javac.Main not found when trying to compile Hadoop program 如何为com.sun.tools.javac.Main.compile()函数设置类路径? - how to set classpath for com.sun.tools.javac.Main.compile() function?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM