Java source files in OS X
I couldn't find any good information on this out there, so here's my short guide on
how to attach the java source in Eclipse on OS X.
If you're a code-completion junkee like me you might have noticed that the Java distribution in OS X doesn't come with any source file attachment by default. You will need to get it and attach it yourself.
The first step is to go to Apple Developer Center and download the
J2SE 5.0 Release 5 Developer Documentation (I haven't switched to Java 6 on the Mac yet). If you're not a ADC member you can become one on the fly (it is a free membership).
Once you've downloaded and installed the disc image with the documentation it only remains to point Eclipse to the right file. Launch Eclipse and open Preferences > Java > Installed JREs and then choose to edit the active JRE (OS X default JRE). In the dialog that appears, choose to attach source and point it to:
This will give you the source attachment for the sun classes, such as the JFC and Swing.
Pages linking to this entry
Pingback is enabled on all archived entries. Read more about pingback in the Pingback 1.0 Specification.