You can download the 10.7 Lion JDK from http://connect.apple.com.
-
Sign in and click the
java
section on the right. -
The jdk is installed into a different location then previous. This will result in IDEs (such as Eclipse) being unable to locate source code and javadocs.
-
At the time of writing the JDK ended up here:
/Library/Java/JavaVirtualMachines/1.6.0_26-b03-383.jdk/Contents/Home
-
Open up eclipse preferences and go to Java –> Installed JREs page
-
Rather than use the “JVM Contents (MacOS X Default) we will need to use the JDK location
-
At the time of writing Search is not aware of the new JDK location; we we will need to click on the Add button
-
From the Add JRE wizard choose “MacOS X VM” for the JRE Type
-
For the JRE Definition Page we need to fill in the following:
- JRE Home: /Library/Java/JavaVirtualMachines/1.6.0_26-b03-383.jdk/Contents/Home
-
The other fields will now auto fill, with the default JRE name being “Home”.
You can quickly correct this to something more meaningful:- JRE name: System JDK
-
Finish the wizard and return to the Installed JREs page
-
Choose “System JDK” from the list
-
You can now develop normally with:
- javadocs correctly shown for base classes
- source code correctly shown when debugging