问题
When I try and do an Ant build on my mac (Snow Leopard, Eclipse 3.6 - Helios) I get an error dialog that says
"Problem Occured"
'Launching projectName build.xml' has encountered a problem. Specified VM install not found: type Standard VM, name jdk1.5.0_14
I can't even find any preferences setting in Eclipse that specifies for it to use jdk1.5.0_14.
When I went into my preferences and went to the Java section and looked at the Installed JREs, the only one I have specified is 1.6.0. Where is it getting the setting to try and use 1.5? (Or am I barking up the wrong tree?)
回答1:
Your ant project launcher refers for some reason to a Java 5 environment.
Select "Run as -> Configurations" and locate the ant build. Then indicate you want this configuration to run with a Java 6 JVM.
回答2:
Delete the ".metadata.plugins\org.eclipse.debug.core.launches\ build.xml.launch" file and problem is solved".
回答3:
This is just an update of the previously posted solution for later versions of Eclipse, like STS.
- If your Ant View is open, R-click on the root (otherwise Run -> External Tools -> External Tools Configuraitons)
- Run as -> External Tools Configurations ...
- Your Ant launch should be selected in the External Tools launchers, if not selected manually
- Go to the JRE tab
- Select Run in the same JRE as the workspace - you can also select a different JRE using the buttons on the right.
- Re-run your ant task(s) - this time you will not get the error message.
回答4:
There was a whole bunch of stuff I had wrong that I changed to fix this, but I believe the crucial piece was an %ATG_HOME%/home/localconfig/dasENV.sh
file had an ATGJRE
a path that was incorrect.
回答5:
I kept getting "Specified VM install not found: type MacOS X VM, name Java SE 6...". And i did this accidentally and it worked: Properties-Java Compiler-Installed JREs-Search Button. It did some soul searching,created yet another JRE entry and it all worked!
回答6:
Right click on the project and choose properties. Go to Java Compiler and make sure Compiler compliance level is set to 1.6 rather than 1.5. I think that should do the trick.
来源:https://stackoverflow.com/questions/4340576/eclipse-on-mac-getting-specified-vm-install-not-found-error-when-trying-to-bu