Mac上的Eclipse,在尝试构建时收到“未找到指定的VM安装”错误

时间:2023-01-20 16:58:58

When I try and do an Ant build on my mac (Snow Leopard, Eclipse 3.6 - Helios) I get an error dialog that says

当我尝试在我的mac(Snow Leopard,Eclipse 3.6 - Helios)上进行Ant构建时,我得到一个错误对话框

"Problem Occured"
'Launching projectName build.xml' has encountered a problem. Specified VM install not found: type Standard VM, name jdk1.5.0_14

“问题发生”“启动projectName build.xml”遇到了问题。未找到指定的VM安装:键入标准VM,名称为jdk1.5.0_14

I can't even find any preferences setting in Eclipse that specifies for it to use jdk1.5.0_14.

我甚至无法在Eclipse中找到任何指定使用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?)

当我进入我的首选项并转到Java部分并查看已安装的JRE时,我指定的唯一一个是1.6.0。尝试使用1.5的设置在哪里? (或者我正在吠叫错误的树?)

6 个解决方案

#1


76  

Your ant project launcher refers for some reason to a Java 5 environment.

您的ant项目启动程序出于某种原因引用Java 5环境。

Select "Run as -> Configurations" and locate the ant build. Then indicate you want this configuration to run with a Java 6 JVM.

选择“Run as - > Configurations”并找到ant build。然后表明您希望此配置与Java 6 JVM一起运行。

#2


8  

Delete the ".metadata.plugins\org.eclipse.debug.core.launches\ build.xml.launch" file and problem is solved".

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

#3


2  

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

这只是之前发布的Eclipse更高版本解决方案的更新,如STS。

  1. If your Ant View is open, R-click on the root (otherwise Run -> External Tools -> External Tools Configuraitons)
  2. 如果您的Ant视图已打开,请在根目录上单击鼠标右键(否则运行 - >外部工具 - >外部工具配置)
  3. Run as -> External Tools Configurations ...
  4. 运行为 - >外部工具配置...
  5. Your Ant launch should be selected in the External Tools launchers, if not selected manually
  6. 如果未手动选择,则应在“外部工具”启动器中选择Ant启动
  7. Go to the JRE tab
  8. 转到JRE选项卡
  9. Select Run in the same JRE as the workspace - you can also select a different JRE using the buttons on the right.
  10. 选择在与工作区相同的JRE中运行 - 您还可以使用右侧的按钮选择其他JRE。
  11. Re-run your ant task(s) - this time you will not get the error message.
  12. 重新运行您的ant任务 - 这次您将不会收到错误消息。

#4


0  

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.

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

#5


0  

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!

我一直收到“未找到指定的虚拟机安装:键入MacOS X VM,命名为Java SE 6 ...”。我偶然做了这件事,它起作用了:Properties-Java Compiler-Installed JREs-Search Button。它做了一些灵魂搜索,创建了另一个JRE条目,这一切都奏效了!

#6


-1  

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.

右键单击项目并选择属性。转到Java Compiler并确保将Compiler compliance level设置为1.6而不是1.5。我认为应该这样做。

#1


76  

Your ant project launcher refers for some reason to a Java 5 environment.

您的ant项目启动程序出于某种原因引用Java 5环境。

Select "Run as -> Configurations" and locate the ant build. Then indicate you want this configuration to run with a Java 6 JVM.

选择“Run as - > Configurations”并找到ant build。然后表明您希望此配置与Java 6 JVM一起运行。

#2


8  

Delete the ".metadata.plugins\org.eclipse.debug.core.launches\ build.xml.launch" file and problem is solved".

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

#3


2  

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

这只是之前发布的Eclipse更高版本解决方案的更新,如STS。

  1. If your Ant View is open, R-click on the root (otherwise Run -> External Tools -> External Tools Configuraitons)
  2. 如果您的Ant视图已打开,请在根目录上单击鼠标右键(否则运行 - >外部工具 - >外部工具配置)
  3. Run as -> External Tools Configurations ...
  4. 运行为 - >外部工具配置...
  5. Your Ant launch should be selected in the External Tools launchers, if not selected manually
  6. 如果未手动选择,则应在“外部工具”启动器中选择Ant启动
  7. Go to the JRE tab
  8. 转到JRE选项卡
  9. Select Run in the same JRE as the workspace - you can also select a different JRE using the buttons on the right.
  10. 选择在与工作区相同的JRE中运行 - 您还可以使用右侧的按钮选择其他JRE。
  11. Re-run your ant task(s) - this time you will not get the error message.
  12. 重新运行您的ant任务 - 这次您将不会收到错误消息。

#4


0  

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.

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

#5


0  

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!

我一直收到“未找到指定的虚拟机安装:键入MacOS X VM,命名为Java SE 6 ...”。我偶然做了这件事,它起作用了:Properties-Java Compiler-Installed JREs-Search Button。它做了一些灵魂搜索,创建了另一个JRE条目,这一切都奏效了!

#6


-1  

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.

右键单击项目并选择属性。转到Java Compiler并确保将Compiler compliance level设置为1.6而不是1.5。我认为应该这样做。