Java Eclipse - Mac Os 默认 JRE 丢失
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1736993/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse - Mac Os Default JRE missing
提问by
The list of installed JRE's is empty, when I click "add" the only options I'm given are - Execution Environment Description, Standard 1.1.x VM, Standard VM.
已安装的 JRE 列表是空的,当我单击“添加”时,我给出的唯一选项是 - 执行环境描述、标准 1.1.x VM、标准 VM。
There's no option for a MacOS Default JRE and choosing standard VM results in the usual "Standard VM not supported on MacOS".
MacOS 默认 JRE 没有选项,选择标准 VM 会导致通常的“MacOS 不支持标准 VM”。
Eclipse Galileo, Mac OS X 10.5.8.
Eclipse 伽利略,Mac OS X 10.5.8。
Any suggestions much appreciated
任何建议非常感谢
回答by Carl Smotricz
You have an "add" button in there which lets you add a new JVM. In fact, there should even be a "look for JVMs" button.
您在那里有一个“添加”按钮,可以让您添加新的 JVM。事实上,甚至应该有一个“查找 JVM”按钮。
If you really don't have one handy, just download a JDK from Sun and then use addto add it to your list of JVMs, and set it to be the default.
如果您真的没有,只需从 Sun 下载一个 JDK,然后将add其添加到您的 JVM 列表中,并将其设置为默认值。
回答by Hymanrabbit
I'm not sure what exactly your question is...
我不确定你的问题到底是什么......
If you want to know where the JVM/JDK resides on Mac OS X, the various versions can be found in /System/Library/Frameworks/JavaVM.framework/Versions
. Just add one of these to Eclipse.
如果您想知道 JVM/JDK 在 Mac OS X 上的位置,可以在/System/Library/Frameworks/JavaVM.framework/Versions
. 只需将其中之一添加到 Eclipse。
回答by VonC
The "Standard VM not supported on MacOS" message has been seen since eclipse3.3 (2006!).
自 eclipse3.3 (2006!) 以来,已出现“MacOS 不支持标准 VM”消息。
The bug 156343reports it fixed in the... eclipse3.6M2 (Helios, M2 released in September 2009, final version to be released in June 2010)
该错误156343个报告它固定在... eclipse3.6M2(太阳神,M2在2009年9月发布,最终版本将在2010年6月发布)
If there is no JVM at all, try to specify one explicitly in the eclipse.ini(like the one I propose, except I use Windows-like path), and see if there is still no JVM proposed in this list after restart.
Check that also with Helios3.6M3(latest Milestone currently available, and check if all the issue is still there.
如果根本没有JVM,尝试在eclipse.ini中明确指定一个(就像我建议的那个,除了我使用类似Windows的路径),然后重新启动后查看此列表中是否仍然没有建议的JVM。
也可以使用Helios3.6M3(当前可用的最新里程碑,并检查所有问题是否仍然存在)进行检查。
A current workaround (that is, if a default VM was there in the first place) would be to, for example for a JDK like the JRockit one:
当前的解决方法(即,如果首先存在默认 VM)将是,例如对于像 JRockit 这样的 JDK:
add the JRockit VM's jars as libraries.
The Mac's classes will take precedence (since they're on the boot classpath) but you'll also be able to see any specifics in the Jar of the attached bundle.To keep JDT sane, you should probably ensure that the Mac's VM comes first in the
.classpath
though ...
将 JRockit VM 的 jars 添加为库。
Mac 的类将优先(因为它们在引导类路径上),但您也可以在附加包的 Jar 中看到任何细节。为了让 JDT 保持理智,您可能应该确保 Mac 的 VM 在
.classpath
...
The 3.6M2 will authorize this, for instance:
3.6M2 将对此进行授权,例如:
回答by Zoltán Ujhelyi
If you want OSX's built-in JVM, then you can add it as a Mac OSX VM, else the comment of VonC tells you what to do.
如果您想要 OSX 的内置 JVM,那么您可以将其添加为 Mac OSX VM,否则 VonC 的注释会告诉您该怎么做。
回答by James Pearce
I had this exact problem with the same version of Eclipse and Mac OS X. A minor detail note, it was the PHP version of Eclipse. I couldn't determine a resolution within Eclipse, but downloading the normal version of Eclipse yielded the ability to select the Mac VM.
我在使用相同版本的 Eclipse 和 Mac OS X 时遇到了这个问题。一个小细节说明,它是 Eclipse 的 PHP 版本。我无法确定 Eclipse 中的分辨率,但下载普通版本的 Eclipse 可以选择 Mac VM。
回答by Joshua
I just had the same problem and I was able to fix it. I had installed Eclipse for PHP (PDT) because I couldn't get PDT to work with Eclipse classic. I then found out that with the new install, Java files won't run! But there's a simple solution:
我只是遇到了同样的问题,我能够解决它。我已经为 PHP (PDT) 安装了 Eclipse,因为我无法让 PDT 与 Eclipse classic 一起工作。然后我发现使用新安装,Java 文件将无法运行!但是有一个简单的解决方案:
Go to Help->Install New Software...
转到帮助-> 安装新软件...
Select:
选择:
Galileo - http://download.eclipse.org/releases/galileo
伽利略 - http://download.eclipse.org/releases/galileo
Under Programming Languages choose:
在编程语言下选择:
Eclipse Java Development Tools 3.5.1.r351_v20090810-0600-7r88FEoFI0WTo6Az-1qFRHm37ChJ
Eclipse Java 开发工具 3.5.1.r351_v20090810-0600-7r88FEoFI0WTo6Az-1qFRHm37ChJ
Install and you'll find your JREs!
安装,您将找到您的 JRE!
回答by Joshua
1) Follow Joshua's answer: "Help->Install New Software... Select: Galileo - http://download.eclipse.org/releases/galileoUnder Programming Languages choose: Eclipse Java Development Tools 3.5.x..."
1) 按照 Joshua 的回答:“Help->Install New Software... 选择:Galileo - http://download.eclipse.org/releases/galileo在 Programming Languages 下选择:Eclipse Java Development Tools 3.5.x...”
2) Then go to Eclipse -> Preferences -> Java -> Installed JREs.
2) 然后去 Eclipse -> Preferences -> Java -> Installed JREs。
3) Click ADD.
3) 点击添加。
4) Under 'Installed JRE Types" you should see the previously missing "MacOS X VM". Select this and click NEXT.
4) 在“已安装的 JRE 类型”下,您应该会看到以前缺少的“MacOS X VM”。选择它并单击下一步。
5) Click the BROWSE button next to the JRE home field, and the dialog box should say "Select the root directory of the JRE installation"
5)点击JRE主页旁边的BROWSE按钮,对话框应该是“选择JRE安装的根目录”
6) Browse to /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
6) 浏览到 /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
7) Click OPEN.
7) 点击打开。
8) In the JRE name field type "JVM 1.5"
8) 在 JRE 名称字段中键入“JVM 1.5”
9) From there you should just be able to click FINISH and have your JRE available.
9) 从那里你应该能够点击完成并让你的 JRE 可用。
I used this to fix a missing JRE error building a Google App Engine project.
我用它来修复构建 Google App Engine 项目时丢失的 JRE 错误。