如何在jGrasp中查看类及文件的Javadoc文档?
Got it, let's walk through exactly how to view Javadoc in jGrasp—covering both individual classes and entire files:
查看某个类的Javadoc文档
First things first: For standard JDK classes, jGrasp usually links to the JDK's built-in Javadoc by default. For your own custom classes, you’ll need to generate their Javadoc first (we’ll cover that step below).
- Quick shortcut: Highlight the class name (like
Stringor your custom class) in your code, then press the F1 key. A dedicated Javadoc window will pop up with all details for that class—including methods, parameters, and description text. - Menu navigation: If you prefer using menus, go to
View>Javadocfrom the top bar. In the window that appears, type the full class name (e.g.,java.util.ArrayList) and click "Show" to load its documentation. - For custom classes: Right-click your project in the left sidebar, hover over
Build, then selectGenerate Javadoc. Follow the on-screen prompts (default settings work for most cases) to generate the documentation files. Once done, you can use the same F1 or menu methods to view their Javadoc.
查看文件的Javadoc文档
When we talk about viewing a file’s Javadoc, we’re typically referring to the documentation for the main class in that Java file. Here’s how to access it:
- Direct shortcut: Open the target Java file, place your cursor inside the class-level Javadoc comment (the block starting with
/**right above your class declaration), then press F1. This will display the full Javadoc for the class in that file. - Menu method: Go to
View>Javadoc, and in the dropdown menu of available classes, select the class from your open file. The Javadoc window will load all documentation for that class, including class-level comments and method details. - View full formatted docs: If you want browser-style Javadoc for the entire file (and project), generate the project’s Javadoc first (right-click project >
Build>Generate Javadoc). Once generated, navigate to thedocfolder in your project directory—you’ll find HTML files for each Java file, which you can open in any browser to view the fully formatted Javadoc.
内容的提问来源于stack exchange,提问作者Shuryu
相关产品推荐
相关产品推荐

