Method for automatically generating javadoc documentation in eclipse

  • 2020-04-01 03:39:00
  • OfStack

This article provides an example of how to automatically generate javadoc documents in eclipse. Share with you for your reference. Specific methods are as follows:

There are three main ways to generate documentation (javadoc) using eclipse:

1. Right-click in the list of projects, select Export, then select javadoc under Java in the Export dialog box, and submit to the next step.
There are two things to note in the Javadoc Generation dialog:
Javadoc command: you should select bin/javadoc.exe for the JDK
Destination: a free choice for the save path to generate the document.
Press finish to start generating the document.

2. File-> Export (file - > Export),
The rest of the steps are the same as the first method.

3. Select the project you want to document, then select it from the menu.
The Project - > Generate Javadoc goes directly to the Javadoc Generation dialog, and the remaining steps are the same as when the first method started in the Javadoc Generation dialog.
 
Either way is fine, but there are a few caveats:

1. Eclipse cannot be generated, error report:
Java. Lang. IllegalArgumentException at sun.net.www.ParseUtil.decode 
This is caused by setting the Java environment variable. For example the classpath to
.; JAVA_HOME % \ lib \ dt. Jar; % JAVA_HOME % \ lib \ tool. The jar, the solution is the classpath to delete http://maven.apache.org/plugins/maven-javadoc-plugin/faq.html or refer to the official document.

2, the generation of document garbled code problem. To improve api-doc, when using eclipse to generate javadoc, "encoding GBK's unmapped characters" is actually a character encoding problem. Open eclipse, project -> Select the project you want to output javadoc item by item, and add the following code to the VM setup line in the last step

-encoding utf-8 -charset utf-8

I hope this article has been helpful to your Java programming.


Related articles: