score:208

Accepted answer

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

score:1

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.

score:1

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.

score:1

in my case, with eclipse 4.5.1 mars (installed from the os x installer, downloaded from eclipse.org) and os x el capitan:

score:3

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

score:7

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.

score:7

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.


Related Query

More Query from same tag