How do I run Eclipse using Oracle's new 1.7 JDK for the Mac?

前端 未结 15 2108
执笔经年
执笔经年 2020-11-28 22:47

I\'m trying to get the new 1.7 JDK working with Eclipse (this is Oracle\'s official release).

I don\'t mean just pointing Eclipse to it so you can use it in projects

相关标签:
15条回答
  • 2020-11-28 23:25

    I had a similar problem after downloading and installing Titanium. My eclipse worked but Titanium didn't and so I ended up looking in the config file to see what was different

    Eclipse had

    eclipse.p2.profile=epp.package.standard
    

    Titanium had

    eclipse.p2.profile=profile
    

    After changing the above to match the eclipse config I was able to launch Titanium

    0 讨论(0)
  • 2020-11-28 23:26

    After installing Oracle JRE and JDK, open Info.plist inside Eclipse.app(right click, show contents) and paste after "Eclipse" "-vm/System/Library/Frameworks/JavaVM.framework/JavaVM"

    Mine looks like this:

        <key>Eclipse</key>
        <array>
            <string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/JavaVM</string>
            <string>-keyring</string><string>~/.eclipse_keyring</string>
            <string>-showlocation</string>
        </array>
    

    If you do that, you will not have to update the file after upgrading JRE.

    0 讨论(0)
  • 2020-11-28 23:27

    Just edit

    Eclipse.app/Contents/Info.plist
    

    You have to use a specific Java version (instead of the platform's default) uncomment one of the following options:

    <string>-vm</string>
    <string>/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java</string>
    

    This helped me rollback from 1.7.0 to 1.6.0.

    0 讨论(0)
  • 2020-11-28 23:29

    Assuming you are using a version of Eclipse which supports Java 7 (I believe anything 3.7 and above) you should be able to specify the JVM used by Eclipse in the eclipse.ini file. If you open it up, you should see a "-vm" property followed by the directory of the JVM you're currently using. You should be able to just change this directory to your 1.7 installation.

    Note: I've not used Eclipse on Mac, so the name of the configuration file may be different.

    0 讨论(0)
  • 2020-11-28 23:30

    This solved for me in few clicks. GoTo Eclipse - > Preference - > Java - > Installed JRE - > Add button - > Standard VM and refer the JRE Home path to /Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home and add custom name. After the JRE path is given the required Jar files will be automatically added and click finish. Please make sure jdk is already installed.

    0 讨论(0)
  • 2020-11-28 23:31

    On a Mac above does not seem to work. For me with Eclipse KEPLER it worked by adding

    -vm /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/
    

    at the end of my eclipse.ini (without that linebreak)

    This finally changed my Eclipse Installation Details > Configuration from

    -vm /System/Library/Frameworks/JavaVM.framework

    to

    -vm /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/bin/../jre/lib/server/libjvm.dylib

    This did not work with my Eclipse INDIGO installation.

    0 讨论(0)
提交回复
热议问题