To open “Eclipse” you need to install the legacy Java SE 6 runtime

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’.

eclipse problem on os x yosemite

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/JavaVirtualMachines/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
    <key>JVMCapabilities</key>
    <array>
      <string>CommandLine</string>
    </array>
  • Replace those lines with

    ?

    1
    2
    3
    4
    5
    6
    7
    8
    <key>JVMCapabilities</key>
    <array>
      <string>JNI</string>
      <string>BundledApp</string>
      <string>WebStart</string>
      <string>Applets</string>
      <string>CommandLine</string>
    </array>
  • 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/

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章