create a single javadoc from several packages
I have the package structures like the following, and each package has relationship with each others:
myproj.package1
myproj.package2
myproj.package3
myproj.package4
and I want to generate a single Javadoc for all packages
javadoc -d c:\javadoc *.java -subpackages myproj.package1 myproj.package2 myproj.package3 myproj.package4
But it generates error messages: "... duplicated classes."
I have no idea what it means, am I using the wrong command?
Please advice!!
The -subpackages option takes as an argument only
the subpackage that is common to all packages.
Try this:
javadoc -d c:\javadoc -subpackages myproj
Also, you don't need to supply *.java if you supply
package names, unless you are also trying to document
source files in the unnamed package that are in
the current directory.
The above will work only if the myproj directory
is in the current directory, as it assumes "-sourcepath ."
If not, you should point -sourcepath to wherever myproj
is located.
Note the -subpackages option takes only a single
argument (possibly with colon-separated subpackage names).
http://java.sun.com/j2se/1.4.1/docs/tooldocs/solaris/javadoc.html#subpackages
-Doug Kramer
Javadoc team