Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse 3.7, Ant, Java 1.7

Tags:

java

eclipse

ant

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.

like image 973
Nik Avatar asked Aug 15 '11 17:08

Nik


People also ask

Does Eclipse support Ant?

Most Eclipse™ distributions include a plugin to launch Apache Ant build files. The provided Apache Ant distribution is a standard distribution of Ant that doesn't include Apache Ivy. You may wish to run Ivy targets against Eclipse's Ant distribution.

How do I update Ant project in Eclipse?

Go to Help -> About RAD -> Intallation details -> Plugins ... locate the org. apache. ant plugin version you are using. Note the Provider ... in this case for me it was Eclipse Orbit.


2 Answers

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: enter image description here, then change it to the Java 7 JDK.

like image 164
Michael Borgwardt Avatar answered Oct 01 '22 00:10

Michael Borgwardt


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"

like image 36
Kal Avatar answered Oct 01 '22 01:10

Kal