java运行src的exe,收到错误运行的javac.exe编译器的消息,而在Eclipse中使用Ant

When I run my Ant build in Eclipse, I'm getting the following error message and the Ant build fails.

Error Message: Error running javac.exe compiler

Line where the build stops:

Has anyone faced a similar problem before? or does anybody know what's wrong here?

System Information: Eclipse Helio, JDK 1.5

解决方案

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 > 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.

Now, you are back at 'Installed JRE's', select the JDK here also.

The below post helped in finding the solution.

JAVA_HOME points to the wrong place

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值