Configure JDK Documentation in IntelliJ IDEA on Mac OS X 10.6.x
by Milinda Lakmal
I began to use Macbook Pro as my personal laptop couple months ago and most of the work I am doing involve Java. I am using IntelliJ IDEA as my Java IDE and I had a issue with documentation popups that shown during code completion for JDK classes. I only saw compiled signatures and I couldn’t see any documentation, as it shown in the days I used Linux. I thought of fixing this issue today and start googling and found this post in stackoverflow.com. Above post shows the solution for this documentation popup issue and also it shows how you can attach JDK source to IntelliJ IDEA. Following are the steps to fix the above mentioned issue:
- Sign in to Apple’s Developer Downloads using you Apple Developer account.
- Select “Downloads” under “Browse” and then “Java” under “Downloads”.
- Download and install “Java for Mac OS X 10.6 Update 3 Developer Package”. (There is a newer developer preview available, but didn’t tried that. According to it you need to have Update 3 anyway.)
- Open the “Project Structure” dialog through “File” menu or through tool bar.
- Click on “SDKs” under “Platform Settings” and look at the “Documentation Paths” tab.
- Add the following paths (the path may be different based on which JDK you’re using):
- /Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home/docs.jar!/docs/api
- /Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home/appledocs.jar!/appledoc/api
- Add the following path under the Sourcepath tab:
- /Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home/src.jar!/src
Thanks Chris Williams for the tip.