收到错误运行的javac.exe编译器的消息,而在Eclipse中使用Ant [英] Getting Error running javac.exe compiler message, while using Ant in Eclipse
问题描述
当我在Eclipse中运行我的Ant构建,我得到了以下错误消息和Ant构建失败。
When I run my Ant build in Eclipse, I'm getting the following error message and the Ant build fails.
错误消息:错误运行的javac.exe编译
Error Message: Error running javac.exe compiler
线那里,并停止:
<javac destdir="${classes.home}" debug="on" fork="true" memoryinitialsize="512M" memorymaximumsize="1G">
<classpath refid="classpath"/>
<src path="${source.home}"/>
</javac>
有没有人遇到过类似的问题?或者是否有人知道什么是错在这里?
Has anyone faced a similar problem before? or does anybody know what's wrong here?
系统信息:月食Helio公司,JDK 1.5
System Information: Eclipse Helio, JDK 1.5
推荐答案
我有同样的问题,这个问题是,在Eclipse java.home指的是JRE,而不是JDK。我改变了它和构建成功。你可以做到以下几点,以将其更改为JDK:
I had the same problem and the issue was, in eclipse java.home was referring to JRE instead of JDK. I changed it and the build was successful. You can do the following to change it to JDK:
preferences>的Java>已安装的JRE>添加...对于JRE类型中选择标准VM'>下一页>目录:选择在我的情况下,你的JDK目录(而非JRE)(C:\\ PROGRAM文件\\的Java \\ jdk1.6.0_16),preSS确定。
Preferences > Java > Installed JRE's > Add... For 'JRE Type' select 'Standard VM' > Next > Directory: select your JDK directory (instead of JRE) (in my case: C:\Program Files\Java\jdk1.6.0_16 ), press OK.
现在,你是回到'安装了JRE的,选择JDK这里也。
Now, you are back at 'Installed JRE's', select the JDK here also.
在后下帮助找到解决方案。
JAVA_HOME指向错误的位置
The below post helped in finding the solution. JAVA_HOME points to the wrong place
这篇关于收到错误运行的javac.exe编译器的消息,而在Eclipse中使用Ant的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!