简体   繁体   中英

Eclipse on Mac, getting “Specified VM install not found” error when trying to build

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?)

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.

删除“.metadata.plugins \\ org.eclipse.debug.core.launches \\ build.xml.launch”文件并解决问题“。

This is just an update of the previously posted solution for later versions of Eclipse, like STS.

  1. If your Ant View is open, R-click on the root (otherwise Run -> External Tools -> External Tools Configuraitons)
  2. Run as -> External Tools Configurations ...
  3. Your Ant launch should be selected in the External Tools launchers, if not selected manually
  4. Go to the JRE tab
  5. Select Run in the same JRE as the workspace - you can also select a different JRE using the buttons on the right.
  6. Re-run your ant task(s) - this time you will not get the error message.

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!

有一大堆我错了,我改变了解决这个问题,但我相信关键的部分是一个%ATG_HOME%/home/localconfig/dasENV.sh文件, ATGJRE路径不正确。

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM