Login to the Apple Developer Connection: (If you don't have an account create one – it is free.)
Go to the downloads page, select the Java category and download and install:
- Java for Mac OS X 10.5 Update 2 Developer Documentation (Disk Image)
If a newer release is available download that instead.
The source code for each version of Java for the Mac can be found here:
|Java version||path to source jar|