Java EE Documentation (JavaDoc) on OS X


I am trying to get IntelliJ show me the JavaDoc for Java EE classes. I have installed the Apple Java Development stuff, since then I have JavaDocs for the SE packages. But i.e. everything within javax.persistence is not working so far.

Does anybody know how to get it to work?!

Many thanks,

1 comment
Comment actions Permalink

I'm a windows user, but I'll do my best to help. It shouldn't be any different.You need to add the documentation to the library (or SDK) definition that has the Java EE classes. The easiest way to find the name of that definition is to use the "Navigate to Class" action (Navigate > Class [⌘N or ⌘O depending on which keymap you are using]). In the dialog, select the "Include non-project classes" option (which can be done by hitting the same keyboard shortcut used to open the dialog a second time). Type the name of a Java EE class. When IDEA finds the class, it will show to the right of the class name the name of the library (or SDK) that it was found in.

Open the project structure dialog (File > Project Structure [⌘ ;]). Find the library definition for the Java EE classes. Depending on how it was added to your project, it might be under the Global Libraries (accessed on the left pane), a Project Library (accessed from the left pane) or a module library (accessed by selecting "modules" on the left pane, then a module, and then the "dependencies" tab). Once you find the library, select it and then click the edit button (or open the context menu and select edit). In the dialog, click the add button and add the root directory (i.e. the directory with the index.html file). IDEA will determine it contains documentation and add it.

If by chance your Java EE classes are a part of your JDK definition, you can add the documentation by opening the Project Structure dialog (as shown above), select "SDKs" from the left pane, select the JDK definition, the select the Documentation paths tab, and then add the root directory that contains your javadocs.

I hope that helps.


Please sign in to leave a comment.