How to see JavaDoc in IntelliJ IDEA?
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
IntelliJ IDEA by JetBrains is one of the most popular Integrated Development Environments (IDEs) used by Java developers. It is designed to maximize developer productivity by automating routine checks and corrections, and by providing a rich set of tools. One of its most valuable features is its ability to integrate and display JavaDoc, which is crucial for understanding the functionality of different classes, methods, and libraries.
Accessing JavaDoc in IntelliJ IDEA
JavaDoc comments are specially formatted comments that are written in the Java source files and can be compiled into a web-accessible format that serves as documentation. IntelliJ IDEA makes it simple to view this important documentation directly in the IDE, enhancing code understanding and ensuring correct API usage.
Hover Feature
The simplest way to view JavaDoc in IntelliJ IDEA is by hovering over any class, method, or variable while holding the Ctrl key (Cmd on macOS). A popup appears that shows the relevant JavaDoc, assuming it exists. This feature is convenient for quickly looking up the documentation without interrupting the coding workflow.
JavaDoc Tool Window
For a more in-depth look at documentation, IntelliJ has a JavaDoc tool window. Here’s how you can access it:
- Navigate to
View>Tool Windows>Documentationor simply pressCtrl + Q(Cmd + Q on macOS). - This command brings up the JavaDoc for the item at the cursor in a separate window pane at the bottom or side of the IDE.
- If additional browsing is needed, you can use the buttons in the top bar of the JavaDoc window to go back and forward through your JavaDoc “history”.
In-line Documentation
If you prefer to see JavaDoc without switching context, IntelliJ IDEA offers an inline documentation view:
- Place the cursor on the element you want to understand.
- Either click
View>Quick Documentationor just pressCtrl + Q(Cmd + Q on macOS). - A popup window appears containing the JavaDoc, which remains as long as the shortcut is held. If you press
Ctrl + Qtwice, this window becomes a floating window which you can move and resize as needed.
Configuring JavaDoc Settings
To optimize how JavaDoc is displayed or which particular pieces of documentation are shown, you can tweak IntelliJ IDEA’s settings:
- Go to
File>Settings(orIntelliJ IDEA>Preferenceson macOS). - In the settings window, navigate to
Editor>General>Code Completion. - Adjust the JavaDoc settings under the ‘Show the documentation popup in’ section.
Here, you can choose how quickly the JavaDoc popup appears when you hover over code elements.
Generating JavaDoc
IntelliJ IDEA also allows developers to generate JavaDoc for their own code:
- Select the project, package, or file for which you wish to generate JavaDoc.
- Go to
Tools> ‘Generate JavaDoc’. - A dialog will appear where you can configure the scope, output format, and output directory among other settings.
Summary Table
| Feature | Shortcut / Path | Description |
| Quick documentation popup | Ctrl + Q (Cmd + Q) | Show the JavaDoc for selected element |
| Documentation tool window | View > Tool Windows | Opens detailed JavaDoc in tool window |
| Hover JavaDoc | Hold Ctrl (Cmd) | Shows a tooltip with brief JavaDoc |
| Generate JavaDoc | Tools > Generate JavaDoc | Allows you to create JavaDoc for your project |
Conclusion
IntelliJ IDEA provides a robust platform for managing JavaDoc, making it accessible just at the point of need and greatly improving developer productivity by keeping necessary information easily reachable. Whether through hover, pop-ups, or dedicated windows, IntelliJ IDEA’s JavaDoc integration ensures that developers spend less time searching for documentation and more time coding effectively.

