JDK documentation on IntelliJ IDEA on Mac OS X

I would like to know how to configure IntelliJ to point to the JDK documentation so that the documentation pop-ups displayed during code completion show me what the function I'm looking for will do. For some reason, IntelliJ cannot find JavaDocs by default.

I am also not 100% sure that the documentation is installed with the JDK installed with the OS. I do not see them in /System/Library/Frameworks/JavaVM.framework/, but I can search for the wrong place. If it is not turned on, I would also like to know what you need to download and where to install it so that JavaDocs for JDK appear in IntelliJ.

+64
java intellij-idea javadoc macos
Nov 10 2018-10-10
source share
4 answers

I had to combine the answers I received so far and add a few additional details to answer my question.

  • Search "Java Developer" from Download for Apple Developers
  • Download and install "Java for Mac OS X 10.6 Update 9 Developer Package" (or later).
  • In IntelliJ, open File → Project Structure.
  • Click the "SDK" in the "Platform Settings" section.
  • Add the following paths to the Documentation Paths tab (the paths may differ depending on which JDK you are using):

    /Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/docs.jar!/docs/api /Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/appledocs.jar!/appledoc/api 
  • Add the following path to the Sourcepath tab:

     /Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/src.jar!/src 

Thanks, @Yishai for the download location and @Gareth Davis for the location of the documentation after installation.

Update for 10.7 / 10.8 [Mountain] Leo:

The steps are the same except for these changes:

  • In step 2, download "Java for OS X 2012-005 Developer Package" (or later).

  • Use these paths instead in step 5.

     /Library/Java/JavaVirtualMachines/1.6.0_35-b10-428.jdk/Contents/Home/docs.jar!/docs/api /Library/Java/JavaVirtualMachines/1.6.0_35-b10-428.jdk/Contents/Home/appledocs.jar!/appledoc/api 
  • Use these paths instead in step 7.

     /Library/Java/JavaVirtualMachines/1.6.0_35-b10-428.jdk/Contents/Home/src.jar!/src 
+109
Nov 10 '10 at
source share

Quick (and dirty?) Solution: Point IntelliJ to http://download.oracle.com/javase/6/docs/api/

+38
Mar 25 '11 at 9:07
source share

Have you installed the Apple Java Developer Kit?

It provides src.jar and docs.jar in /Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home

Please note that this is Update 3. If they are present, Intellij will simply find them, or at least mine did.

are in the Java release notes

+4
Nov 10 2018-10-10
source share

This should tell you what you need to know: Get local copies of Mac OS X Java and Javadoc source code - Concord Consortium wiki .

This page recommends going to https://connect.apple.com and downloading and installing "Java for Mac OS X 10.5 Update 2 Developer Documentation (Disk Image)" or an equivalent newer version. It describes several ways to view documentation based on the Java jar file located in the following path:

 /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/src.jar 
+2
Nov 10 2018-10-10
source share



All Articles