简体   繁体   中英

Get command line for Javadoc generated via Eclipse

Eclipse has a really nice wizard to generate Javadoc for selected classes. However, is it possible to get the command line that was used by Eclipse to generate the Javadoc?

I already had a look at this question which says that it is possible to generate an Ant script, but I haven't found a way to get the actual command line. I know that there is a man page respectively a documention of the javadoc command, but rather figuring this out by mself, I thought maybe there is a way to get the commands/options from Eclipse (or Ant).

You just have to look at Oracle's documentation about Javadoc

The command line should have this structure:

 javadoc [options] [packagenames] [sourcefiles] [@files] 

options

Specifies command-line options, separated by spaces. See Options for javadoc, Extended Options, Standard doclet Options, and Nonstandard Options Provided by the Standard doclet.

packagenames

Specifies names of packages that you want to document, separated by spaces, for example java.lang java.lang.reflect java.awt. If you want to also document the subpackages, then use the -subpackages option to specify the packages.

By default, javadoc looks for the specified packages in the current directory and subdirectories. Use the -sourcepath option to specify the list of directories where to look for packages.

sourcefiles

Specifies names of Java source files that you want to document, separated by spaces, for example Class.java Object.java Button.java. By default, javadoc looks for the specified classes in the current directory. However, you can specify the full path to the class file and use wildcard characters, for example /home/src/java/awt/Graphics*.java. You can also specify the path relative to the current directory.

@files

Specifies names of files that contain a list of javadoc command options, package names, and source file names in any order.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM