本文介绍了用于 OS X Mavericks 的 Eclipse Kepler 请求 Java SE 6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我刚刚对 OS X Mavericks 进行了全新安装,并且已经下载了 Eclipse Kepler ,但是如果我执行它,会给我以下消息:

I have just made a clean installation of OS X Mavericks, and I have downloaded Eclipse Kepler , but if I execute it, gives me this message:

要求我安装Runtime Java SE 6;我已经安装了 Java 7,如果我在该对话框中按 Install,下载并安装它,然后再次打开 Eclipse,该对话框将再次出现.

Asking me to install Runtime Java SE 6; I have already installed Java 7, and if I press Install in that dialog, download and install it, and open Eclipse again, the dialog appears again.

我该如何解决?

推荐答案

这部分是因为 Oracle 缺少 JRE8 VM 功能的定义.

This is in part due to Oracle's missing definitions of the JRE8 VM capabilities.

如果您根本不想安装 JRE6 而只是使用 JRE8 而没有将其符号链接到 JRE6,您可以执行以下操作:

In case you don't want to install JRE6 at all and simply use JRE8 without symlinking it to the JRE6 either you can do the following:

将位于下面命名的路径中的 Info.plist 复制到例如~/下载/:

Copy the Info.plist located at the path named below to e.g. ~/Downloads/:

/Library/Java/JavaVirtualMachines/jdk.1.8.<…>/Contents/

然后替换

<key>JVMCapabilities</key>
 <array>
  <string>CommandLine</string>
 </array>

具有以下内容:

<key>JVMCapabilities</key>
 <array>
  <string>JNI</string>
  <string>BundledApp</string>
  <string>CommandLine</string>
 </array>

然后将文件复制回其原始位置(您需要管理员权限).要使此更改生效,您需要注销您的帐户(然后重新登录)或重新启动计算机.Java 6 的对话框不应该再出现,Eclipse 应该可以使用 JRE8(或 JRE7)正常启动.这同样适用于最初要求 Java 的任何其他应用程序,例如Adobe 的创意套件.

Afterwards copy the file back to its original location (you need administrator rights). For this change to take effect you need to log out of your account (and back in) or restart your computer. The dialog for Java 6 should shouldn't appear anymore and Eclipse should launch just fine using JRE8 (or JRE7). The same holds true for any other application that initially asks for Java, e.g. Adobe's Creative Suite.

在相关说明中,即使通过系统偏好设置"中的Java 偏好设置面板"完成更新,此 plist 更改似乎仍然存在.

On a related note it appears that this plist change sticks even after updates done through the Java Preference Panel in the System Preferences.

如果还是不行.您可能需要添加一些文件夹和符号链接(详情):

If it still doesn't work. You might need to add some folders and a symlink (details):

sudo mkdir -p /Library/Java/JavaVirtualMachines/jdk1.8.0_*.jdk/Contents/Home/bundle/Libraries
sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.8.0_*.jdk/Contents/Home/jre/lib/server/libjvm.dylib /Library/Java/JavaVirtualMachines/jdk1.8.0_*.jdk/Contents/Home/bundle/Libraries/
sudo mkdir -p /System/Library/Java/JavaVirtualMachines/1.6.0.jdk
sudo mkdir -p /System/Library/Java/Support/Deploy.bundle

这篇关于用于 OS X Mavericks 的 Eclipse Kepler 请求 Java SE 6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 09:25