eclipse使用ant编译问题

来源:互联网 发布:js控制a标签显示隐藏 编辑:程序博客网 时间:2024/05/16 14:50

注:eclipse是Mars版本

1.ant编译报Could not find the main class: org.eclipse.ant.internal.launching.remote.InternalAntRunner. Program will exit.错误


I just installed Mars and when I tried to execute a build.xml after checking out an existing and working project I got that error message:Could not find the main class: org.eclipse.ant.internal.launching.remote.InternalAntRunner. Program will exit.

The solution is to go to Run as → External tools configuration… → JRE where the default was set to “Separate JDK”: jdk1.6.0_31 (I had set up JDKs 6-8 in Preferences after installing). I changed this to “run in the same JRE as the workspace” and now it works.

Bug fix would be to provide a working default configuration with setup. Configuration should be in a way it does not break if the user adds additional JDKs to Preferences.


原文地址:https://bugs.eclipse.org/bugs/show_bug.cgi?id=472599


2.ant编译报JRE version less than 1.7 is not supported错


解决方法:http://stackoverflow.com/questions/31052878/run-eclipse-mars-with-java-1-6

1 0
原创粉丝点击