Eclipse Kepler for OS X Mavericks request Java SE 6

JavaEclipseOsx Mavericks

Java Problem Overview


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?

Java Solutions


Solution 1 - Java

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

Solution 2 - Java

To be able to run Eclipse with Java 7 (Oracle), I launch Eclipse using this file: eclipse/Eclipse.app/Contents/MacOS/eclipse. "eclipse" folder contains alias for this file by default. So all that you need to do is to double-click the alias named "eclipse".

Also Oracle warns that Oracle's Java version 7u25 and below have been disabled by Apple on OS X (see here). I had upgraded to the latest JDK version before I found out the way of launching Eclipse with Java 7. So I don't know if the upgrade is necessary or not.

Solution 3 - Java

I had this problem after a Mavericks install. I was able to solve it by installing Java from the Apple download at http://support.apple.com/kb/dl1572

I hope this helps.

Solution 4 - Java

You need to download and install the JAVA for MAC manually. That is what worked for me.

Download here: http://support.apple.com/kb/DL1572?viewlocale=en_US

Solution 5 - Java

I happened to get it running without a procedure like the suggestions above. I erased the eclipse folder and then copied it back from the trashcan. Please verify if it works for you.

Solution 6 - Java

On MAC OS X, after installing JRE 7 from Oracle using the .dmg download, on opening Eclipse, it still pointed back to my old JRE 6.

After numerous google searches for the problem, and getting here, in desperation I clicked on "Search" in Eclipse --> Preferences --> Installed JREs and voila - it picked up JRE 7.

Solution 7 - Java

In my case, with Eclipse 4.5.1 Mars (installed from the OS X installer, downloaded from eclipse.org) and OS X El Capitan:

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionPieroView Question on Stackoverflow
Solution 1 - JavaNikolas GrottendieckView Answer on Stackoverflow
Solution 2 - JavaAlexander PoleschukView Answer on Stackoverflow
Solution 3 - JavaBob LeeView Answer on Stackoverflow
Solution 4 - JavaScottView Answer on Stackoverflow
Solution 5 - JavaKåre JonssonView Answer on Stackoverflow
Solution 6 - JavatristanberghView Answer on Stackoverflow
Solution 7 - JavaGreg DubickiView Answer on Stackoverflow