Recently i just upgraded my Macbook Pro to the new Macbook Retina Display (mid 2014) that comes default with OS X Yosemite 10.10.1. After installing Java JDK 1.8, all my Android IDE (Eclipse and Android Studio) work well so i can continue my development as usual. The problem comes when i update the OS X to Yosemite 10.10.3, my Eclipse won’t open anymore. When i start Eclipse by clicking on its icon, the warning dialog appears saying ’To open “Eclipse” you need to install the legacy Java SE 6 runtime’.

To open “Eclipse” you need to install the legacy Java SE 6 runtime_第1张图片

eclipse problem on os x yosemite

The suggested solution is to install Java SE 6 runtime from Apple website  by clicking the More Info button. But because the internet service is expensive here and i don’t want to spend extra internet quota to download the java update,i do some googlings and found an alternative solution.

The solution is simple, just to make some changes the Info.plist file in Java library folder:

  • Locate the Info.plist in your JDK folder, mine is under

    ?

    1
    /Library/Java/J avaVirtualMach ines/jdk1. 8 .0_45.jdk/Contents/
  • Edit the Info.plist file using your favorite editor

    ?

    1
    $vim /Library/Java/JavaVirtualMachines/jdk1. 8 .0_45.jdk/Contents/Info.plist
  • Find the following lines

    ?

    1
    2
    3
    4
    JVMCapabilities
       CommandLine
  • Replace those lines with

    ?

    1
    2
    3
    4
    5
    6
    7
    8
    JVMCapabilities
       JNI
       BundledApp
       WebStart
       Applets
       CommandLine
  • Restart the OS X so the changes will take effect

Hope it helps.

原文:http://www.londatiga.net/it/programming/eclipse-issue-os-x-yosemite-to-open-eclipse-you-need-to-install-the-legacy-java-se-6-runtime/