简体   繁体   中英

How can I get Eclipse on OSX to use Java 1.6?

I just installed Java 1.6 on my OSX and everything works brilliantly, except that Eclipse refuses to start. It puts up a huge prompt from which I can't copy/paste, but it's clearly stating that it wants to be using Java 1.5 and can't find it anymore.

I don't see anything in its configuration files about which version of Java it should be looking for. Has anyone dealt with this?

Thanks in advance.

on /Applications/Eclipse/Eclipse.app right click and choose "Show Package Contents" open Contents/Info.plist with a text editor NOT plist editor

add <string>-vm</string> <string>/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java</string>

to

<key>Eclipse</key>
        <array>
<!-- add it here -->
</array>

save it and restart.

Unless I'm mistaken, the Java 1.6 vm on the Mac is 64 bit only. To use it, you'll need a 64bit version of Eclipse. The only 64bit port of eclipse on the mac is the new cocoa build, find it here .

In a few weeks, the Galileo release will be finished, there you can find the 64 bit cocoa port by going to Eclipse Classic -> Other Downloads.

If you want to keep your current eclipse install, you'll have to do as the other answers suggest and change them to use 1.5

You should switch to your previous version of Java, under Utilities, Java Preferences, and dragging 1.5 32 bit as the first choice.

The reason for the error is that the bundled SWT JINI libraries seem to be compiled for only certain platforms.

You can always check the Console for specific error messages.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM