Eclipse 3.7, Ant, Java 1.7

耗尽温柔 提交于 2019-12-14 00:17:50

问题


I went through and uninstalled all Java from my computer. Then I installed JavaSE JDK1.7. I then modified Eclipse configuration so it would start and opened it up. I have an Ant script to build my project and I want to build my project against 1.7, but whenever I run the script, it says

'Launching PROJECT build.xml' has encountered a problem.

Specified VM install not found: type Standard VM, name jdk1.6.0_21

The installed JRE in Eclipse is 1.7 and nothing else. I cannot for the life of me find how to change what Ant is looking for.


回答1:


This is because you still have the old JDK configured as JRE in the External Tools Configuration" in eclipse - open it via the arrow menu next to this button in the toolbar:

, then change it to the Java 7 JDK.


回答2:


In Eclipse, click the ant file -- Run As -- External Tools Configuration and click on the JRE tab.

Select "Run in the same JRE as the workspace"




回答3:


Delete the "C:\Users\%USERNAME%\workspace.metadata.plugins\org.eclipse.debug.core.launches\%PROJECT_NAME% build.xml.launch file"

That solved problem for me.



来源:https://stackoverflow.com/questions/7068172/eclipse-3-7-ant-java-1-7

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!