Java 安装 Mac OS X Yosemite (Mac OS 10.10) 后 Eclipse 无法启动

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24023956/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-14 09:46:28  来源:igfitidea点击:

Eclipse won't start after installing Mac OS X Yosemite (Mac OS 10.10)

javaeclipsemacososx-yosemite

提问by leonard

Right after upgrading to Mac OS Yosemite (10.10), my Eclipse won't start anymore. Instead I get

升级到 Mac OS Yosemite (10.10) 后,我的 Eclipse 将不再启动。相反,我得到

The JVM shared library /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/bin/../jre/lib/server/libjvm.dylib" does not contain the JNI_CreateJavaVM symbol.

JVM 共享库 /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/bin/../jre/lib/server/libjvm.dylib”不包含 JNI_CreateJavaVM 符号。

I checked java -versionand get

我检查java -version并得到

java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

I search and have found one similar problem Reinstalling Java 7 JDK on OSX. It is suggesting a reinstallation of Java. I am not sure if my problem falls into the same category as his. So, is reinstallation a good way to solve the problem? Any other advice? Thanks!

我搜索并发现了一个类似的问题Reinstalling Java 7 JDK on OSX。它建议重新安装Java。我不确定我的问题是否与他的问题属于同一类别。那么,重新安装是解决问题的好方法吗?还有什么建议吗?谢谢!

采纳答案by Taseen

Go to the link below and download Java for OS X 2014-001

转到下面的链接并下载适用于 OS X 2014-001 的 Java

http://support.apple.com/kb/DL1572?viewlocale=en_US&locale=en_US

http://support.apple.com/kb/DL1572?viewlocale=en_US&locale=en_US

Hopefully after installing it , it will work

希望安装后,它会工作

回答by Sven

You may change the system version temporarily in the "SystemVersion.plist" located at System > Library > CoreServices.

您可以在位于 System > Library > CoreServices 的“SystemVersion.plist”中临时更改系统版本。

Edit as root changing ProductVersion to 10.7.3 (or whatever works for you).

以 root 身份编辑将 ProductVersion 更改为 10.7.3(或任何适合您的内容)。

Install java.

安装java。

Don't forget to change it back.

别忘了把它改回来。

回答by Sri Krishna Paritala

Try this https://jdk8.java.net/download.htmlJava8u20 early Update.

试试这个https://jdk8.java.net/download.htmlJava8u20 早期更新。

回答by Fouad J.

Make sure you are using the 64 bit version of Mac Eclipse I just tried it works flawless

确保您使用的是 64 位版本的 Mac Eclipse 我刚刚试过它工作正常

回答by incredion

Two cases:

两种情况:

  1. if you already have installed Java 8 and Eclipse Luna e.g. on Mavericks and (intent to) update to Yosemite: just update, it will work fine.

  2. if you do not have Java installed and want to run Eclipse on Yosemite:

  1. 如果您已经在 Mavericks 上安装了 Java 8 和 Eclipse Luna,并且(打算)更新到 Yosemite:只需更新,它就会正常工作。

  2. 如果您没有安装 Java 并且想在 Yosemite 上运行 Eclipse:

That means, if you want to use Eclipse Luna and Java 8, install it while running Mavericks, then update to Yosemite. Do not try to install Java 8 on Yosemite as that at the moment won't work.

这意味着,如果您想使用 Eclipse Luna 和 Java 8,请在运行 Mavericks 时安装它,然后更新到 Yosemite。不要尝试在 Yosemite 上安装 Java 8,因为目前这不起作用。

What does not work on my Mac is: installing Java 6 and run Eclipse Luna as that needs Java 7 or 8. Installing Java 7 or 8 does not solve the prob as something with the installer seems to be buggy. Should be solved by Oracle in a few days, however.

在我的 Mac 上不起作用的是:安装 Java 6 并运行 Eclipse Luna,因为它需要 Java 7 或 8。安装 Java 7 或 8 不能解决问题,因为安装程序似乎有问题。不过过几天应该会被Oracle解决。

回答by Jonnathan Q

After upgrading to yosemite, java 6 jdk is no longer available, remember that jdk 6 for mac osx is a 32-bit application, older eclipse releases needs a 32-bit jvm in order to run properly, a 32-bit application cannot run with a 64-bit jvm like java 7 or 8, so you need to install jdk 6 to run those java applications that needs a 32 bit virtual machine. As already posted here you can download jdk 6 from http://support.apple.com/kb/DL1572?viewlocale=en_US&locale=en_US

升级到 yosemite 后,java 6 jdk 不再可用,记住 jdk 6 for mac osx 是 32 位应用程序,较旧的 eclipse 版本需要 32 位 jvm 才能正常运行,32 位应用程序无法运行一个 64 位的 jvm,比如 java 7 或 8,所以你需要安装 jdk 6 来运行那些需要 32 位虚拟机的 java 应用程序。正如已经在这里发布的,您可以从http://support.apple.com/kb/DL1572?viewlocale=en_US&locale=en_US下载 jdk 6

回答by Mutant

I installed Java JRE from Oracle: http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jre-8u25-macosx-x64.dmg

我从 Oracle 安装了 Java JRE:http: //download.oracle.com/otn-pub/java/jdk/8u25-b17/jre-8u25-macosx-x64.dmg

Then install the Apple Package: http://support.apple.com/kb/DL1572?viewlocale=en_US&locale=en_US

然后安装 Apple Package:http: //support.apple.com/kb/DL1572?viewlocale=en_US&locale= en_US

I was able to install eclipse-ide from homebrew cask

我能够从自制软件桶安装 eclipse-ide

brew cask install eclipse-ide eclipse-java

brew cask 安装 eclipse-ide eclipse-java

(Please be aware that brew cask installs to ~/Applications not /Applications)

(请注意 brew cask 安装到 ~/Applications 而不是 /Applications)

I don't normally use Eclipse, however I was able to get the IDE up and going. I will note that java on the command line is broken, which is new in Yosimite.

我通常不使用 Eclipse,但是我能够启动并运行 IDE。我会注意到命令行上的 java 已损坏,这是 Yosimite 中的新功能。

Please let me know if that doesn't work. Or if you need some help with Homebrewor Cask

如果这不起作用,请告诉我。或者,如果您需要HomebrewCask 方面的帮助

回答by Riccardo Donato

I solved this issue creating those empties folders as root without downgrade using java8 (vers.1.8.0_60-ea):

我解决了这个问题,以 root 身份创建这些空文件夹而不使用 java8 (vers.1.8.0_60-ea) 降级:

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk and /System/Library/Java/Support/Deploy.bundle

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk 和 /System/Library/Java/Support/Deploy.bundle

Hope it helps...

希望能帮助到你...