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

前端 未结 7 2091
终归单人心
终归单人心 2021-01-30 12:57

Just installed a fresh version of Kepler 64bit \"for Java Developers\" on Yosemite, getting this error on first launch. Any thoughts on how to fix? Really do not want to downgra

7条回答
  •  野的像风
    2021-01-30 13:36

    I just encountered this in another Eclipse-based app on Yosemite and figured out (with help from the references below) how to get the app running without installing the legacy Java SE 6 JRE. Here are the steps in case it helps other devs get Eclipse working.

    PRECONDITIONS

    $ sw_vers -productVersion 
    10.10.1
    $ java -version
    java version "1.8.0_25"
    Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
    Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
    

    Other configurations might work; this is my environment.

    STEPS

    1. Edit the info.plist for the JDK after installing:

      $ sudo nano `/usr/libexec/java_home -V`/../info.plist
      
    2. Change the following section:

      JVMCapabilities
       
        CommandLine
        
      

      to

      JVMCapabilities
       
        JNI
        BundledApp
        WebStart
        Applets
        CommandLine
       
      
    3. Try to open the app from the command-line (not sure if this is strictly necessary, but what I did)

      You should get an error "(app) can't be opened because it is from an unidentified developer."

    4. Go to System Preferences: Security Settings (General) and you should see the recent app next to a button "Open Anyway" -- click this button to open the app.

    This opens Eclipse without requiring the separate download of the legacy Java SE 6 files.

    NOTES

    When I was solving this on MTGBrowser (below) I also followed advice to change the info.plist of the app by adding the following section to the 'Eclipse' key:

    -vm/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java
    

    However, I'm not sure that's strictly required. In any case, that wasn't sufficient -- I also had to change the JDK info.plist and security as described above for a complete solution.

    REFERENCES

    • https://sourceforge.net/p/mtgbrowser/bugs/402/#c78c
    • http://crunchify.com/os-x-mavericks-eclipse-java-issue/
    • http://mac-how-to.wonderhowto.com/how-to/open-third-party-apps-from-unidentified-developers-mac-os-x-0158095/

提交回复
热议问题