 |
How to get code completion with Javadocs in Netbeans on Mac OS X
Posted by joshy on April 30, 2006 at 07:54 PM | Comments (2)
I'm sure I'm the last Mac Java developer here to figure this out so I'm posting it not so much for you but for future generations intrepid googlers to find.
How to get Netbeans code completion with Javadocs to work in Mac OS X
Netbeans is a great IDE and I'm really starting to warm up to it (starting to warm up to IDEs in general, actually). One of my big complaints so far has been the lack of Javadocs in the code completion popup window. Since I had some extra time today I thought I'd finally figure it out.
The reason Netbeans doesn't have javadoc code completion on the Mac, but does on other operating systems, is that Apple doesn't ship the src.jar by default. This is the jar which contains the source code to Java (at least the public APIs, go to the jdk project for the rest), and more importantly: all of the Javadocs. No src.jar, no javadocs. So the simple remedy is to install them. Here's how you do it:
- Download the J2SE 5.0 Documentation bundle from Sun at
http://java.sun.com/j2se/1.5.0/download.jsp
- Unzip the downloaded file and place it wherever you want to store your documentation.
- Open netbeans and go to the Tools -> Java Platform Manager menu.
- Select the default platform (you may have only one), select the Javadocs tab, then press the Add Zip/Folder button.
- In the file chooser navigate to the docs directory and select the api directory.
- Pat yourself on the back. You now have code completion with javadocs.
Sweet!
Bookmark blog post: del.icio.us Digg DZone Furl Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment
-
Surely, as a Mac developer, you would have installed the full JDK (not just the Apple-bundled JRE) from ADC, and so Netbeans would have found the source when it was installed?
My Netbeans found the docs in /Library/Java/Home/docs which is a symlink to the current default JDK install (1.5.0_06).
ADC is at http://connect.apple.com .... all Mac devvers should get a free ADC account and keep up to date with things there.
This is better than getting it from Sun because you also get the source and javadocs and general docs for the Apple-specific bits.
Posted by: goron on May 01, 2006 at 01:02 AM
-
You also get that when you install the Developer Tools from Mac OS X install discs.
Posted by: gfx on May 01, 2006 at 04:06 AM
|