-
Enhancement
-
Resolution: Won't Fix
-
P4
-
None
-
1.2.2
-
x86
-
windows_nt
Name: rlT66838 Date: 03/16/2000
java version "1.2.2"
Classic VM (build JDK-1.2.2-W, native threads, symcjit)
I am running javadoc on a set of source (.java) files. I have two different
cases to look at:
Case 1:
If I have the source files "exploded" into the appropriate directory hierarchy,
running javadoc on these files work fine. The command syntax used includes
the -sourcepath option pointing to the root of the hierarchy along with
the package names specified individually.
Case 2:
If I have the source files in a .jar file, running javadoc on these files
fails with the error
"Src.jar(a/b/c/myClass.java): Class a.b.c.myClass already defined in
a/b/c/myClass.java."
The command syntax used includes -sourcepath option pointing to the Src.jar
file and package names specified individually. For example:
javadoc -sourcepath Src.jar a.b a.b.c
It seems to only happen in cases where I am Javadocing a package as well as
its parent's package (ie. a.b.c and a.b).
In this case, source files under a.b make no reference to classes in the
a.b.c package. However, a.b.c classes do reference a.b. Also, there are
interfaces in the a.b package.
Looking at the verbose output of javadoc, javadoc is loading files for package
a.b. It begins to parse source files in that package. After parsing several
class, abstract class and interface files, it parses an interface. Then, for
some unexplained reason, it parses a file in the subpackage
(a.b.c.myClass.java). Again, _nothing_ in package a.b references anything in
a.b.c. It finishes package a.b.
Then, it loads classes for package a.b.c. When it reaches a class parsed
as part of javadocing a.b, it fails with the above error.
Looking at the verbose output for case #1. I noticed that processing package
a.b only parses source files in package a.b. It does not attempt to go to
the subpackage a.b.c. Thus, javadoc completes successfully.
(Review ID: 102497)
======================================================================