-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
1.4.0
-
generic
-
other
If -sourcepath is omitted, we look at -classpath for source files.
This was done for backward compatibility, as Javadoc 1.0 did
not have -sourcepath option, to allow -classpath to locate source
files in Javadoc 1.1 and later. This is currently documented
as follows:
If -sourcepath is omitted, javadoc uses the class path to find
the source files (see -classpath). Therefore, the default -sourcepath
is the value of class path. If -classpath is omitted and you are passing
package names into javadoc, it looks in the current directory
(and subdirectories) for the source files.
I suggest removing that connection now. It seems to me that if
-sourcepath is omitted, it should not look on -classpath for
.java files -- instead -sourcepath should default to the current directory.
The way it currently works can lead to problems where javadoc is
looking on the classpath for source files and defeat the
purpose of having a separate -sourcepath option. Developers
have had plenty of time to upgrade their 1.0 scripts to use
-sourcepath.
This was done for backward compatibility, as Javadoc 1.0 did
not have -sourcepath option, to allow -classpath to locate source
files in Javadoc 1.1 and later. This is currently documented
as follows:
If -sourcepath is omitted, javadoc uses the class path to find
the source files (see -classpath). Therefore, the default -sourcepath
is the value of class path. If -classpath is omitted and you are passing
package names into javadoc, it looks in the current directory
(and subdirectories) for the source files.
I suggest removing that connection now. It seems to me that if
-sourcepath is omitted, it should not look on -classpath for
.java files -- instead -sourcepath should default to the current directory.
The way it currently works can lead to problems where javadoc is
looking on the classpath for source files and defeat the
purpose of having a separate -sourcepath option. Developers
have had plenty of time to upgrade their 1.0 scripts to use
-sourcepath.