Eclipse Kepler for OS X Mavericks request Java SE 6

Piero picture Piero · Oct 24, 2013 · Viewed 77.6k times · Source

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:

enter image description here

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.

How I can fix it?

Answer

Nikolas Grottendieck picture Nikolas Grottendieck · Oct 25, 2013

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

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:

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

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

and then replace

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

with the following:

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

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.

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