How do I setup Eclipse for the Mac?
How do I setup Eclipse for the Mac? It says that I need the Java SDK, but when I go to Oracle's site I don't see OS 开发者_高级运维X in the list of operation systems.
You don't need to install the JDK on OSX. Just download the Eclipse installer for Mac OSX. It works for my Mac out of the box.
JDK comes by default with OS X, you should have JDK 6 already.
Go to your Eclipse -> Preferences -> Java -> Installed JREs.
If nothing is listed there, then click on Search button. That should locate all the JREs.
Here's mine:-
By the way, I'm running Snow Leopard, if that helps any. :)
I was going to say it was already present on my Mac (I've been running Eclipse for a while; Java came pre-installed), but I'm still running OSX 10.5 and it looks like Apple has given Java the boot: :-(
Java Deprecation
As of the release of Java for Mac OS X 10.6 Update 3, the Java runtime ported by Apple and that ships with Mac OS X is deprecated. Developers should not rely on the Apple-supplied Java runtime being present in future versions of Mac OS X.
The Java runtime shipping in Mac OS X 10.6 Snow Leopard, and Mac OS X 10.5 Leopard, will continue to be supported and maintained through the standard support cycles of those products.
If you're running a Mac prior to the deprecated version, see the link and it talks about the location on your hard drive.
UPDATE: whew, looks like there's hope after all:
http://www.apple.com/pr/library/2010/11/12openjdk.html
Apple also confirmed that Java SE 6 will continue to be available from Apple for Mac OS X Snow Leopard® and the upcoming release of Mac OS X Lion. Java SE 7 and future versions of Java for Mac OS X will be available from Oracle.
Java downloads available here:
- Java 1.6
- Java 1.7
- Java 1.8
You need to make sure that you have the right version of Eclipse and that your Mac is configured to have the correct SDK as the default; if you go to Finder > Applications > Utilities > Java Preferences, you can see which versions of Java are installed and select which one will be automatically selected; using 32-bit versions of Eclipse with the 64-bit one selected or vice-versa probably won't work very well.
精彩评论