[英]How to generate Javadoc HTML files in Eclipse?
I have written Javadoc style comments like this in my project's code: 我在项目代码中编写了如下的Javadoc样式注释:
/**
* Description...
*
* @param ...
* @return .....
*/
How can I generate Javadoc HTML files using the Eclipse IDE? 如何使用Eclipse IDE生成Javadoc HTML文件?
Project > Generate Javadoc... . 项目 > 生成Javadoc...。
In the Javadoc command: field, browse to find javadoc.exe (usually at [path_to_jdk_directory]\\bin\\javadoc.exe ). 在Javadoc命令:字段中,浏览以找到javadoc.exe (通常位于[path_to_jdk_directory] \\ bin \\ javadoc.exe处 )。
Check the box next to the project/package/file for which you are creating the Javadoc. 选中要为其创建Javadoc的项目/包/文件旁边的框。
In the Destination: field, browse to find the desired destination (for example, the root directory of the current project). 在“ 目标位置:”字段中,浏览找到所需的目标位置(例如,当前项目的根目录)。
Click Finish . 点击完成 。
You should now be able to find the newly generated Javadoc in the destination folder. 现在,您应该能够在目标文件夹中找到新生成的Javadoc。 Open index.html . 打开index.html 。
This is a supplement answer related to the OP: 这是与OP相关的补充答案:
An easy and reliable solution to add Javadocs comments in Eclipse: 一个在Eclipse中添加Javadocs注释的简单可靠的解决方案:
To use this tool, right-click on class and click on JAutodoc . 要使用此工具,请右键单击class,然后单击JAutodoc 。
You can also do it from command line much easily. 您也可以从命令行轻松完成此操作。
From command line run: 从命令行运行:
javadoc YourClassName.java javadoc YourClassName.java
To batch generate docs for multiple Class: 批量生成多个类的文档:
javadoc *.java javadoc * .java
To quickly add a Javadoc use following shortcut: 要快速添加Javadoc,请使用以下快捷方式:
Windows : alt + shift + J Windows : alt + shift + J
Mac : ⌘ + Alt + J Mac : ⌘ + Alt + J
Depending on selected context, a Javadoc will be printed. 根据所选上下文,将打印Javadoc。 To create Javadoc written by OP, select corresponding method and hit the shotcut keys. 要创建由OP编写的Javadoc,请选择相应的方法,然后按快捷键。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.