JDK For Lion

In October 2010 Apple changed its mind about Java. Before, the Java JDK (the java development kit) was preinstalled. Then they decided to join the openJDK (donating code, but letting someone else keep it current), so now Oracle has a Mac port of Java. Starting with Java7, you can get the OSX version of the Java SE JDK at oracle, which will work well with Lion (10.7) and Mountain Lion (10.8).

Downloading Java for Newer Macs

Mountain Lion (10.8)

You may have to right-click the Installer package and select "Open" to appease Mountain Lion's new security feature.

Downloading Java for older Macs

Go to the Terminal (It is in the Utilities folder inside the Applications folder)

Type:

java -version

If you get a message saying Java is not installed, it will request a install automatically. A dialogue box comes up, Click Install. When successful, you have (build 1.6.0_26-b03-383-11A511) installed.

Now when you type

java -version

you get this message

Another way is to download the installation package from Apple. You can download Java for Lion (10.7) here.

Downloading the Java JDK from Apple Development site

You can download the 10.7 Lion JDK from http://connect.apple.com. Sign in with your apple id, and click the java section on the right (you don't need to be a paying ADC member to get this).

While you are there you make wish to install Xcode and X11, but you don't need to for this course.

Bleeding edge stuff

You can find the latest build at http://code.google.com/p/openjdk-osx-build/, but use at your own risk! You can select which version (among other things) using the "Java Preferences.app" found in the Utilities folder in the Applications folder.

Troubleshooting Eclipse

Some have had Eclipse installed before upgrading to Lion, and afterward had problems. Click here to see the fix