Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4754840

stddoclet: If -sourcepath is omitted, don't use -classpath as its default

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.4.0
    • tools

      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.


            bpatel Bhavesh Patel (Inactive)
            dkramersunw Douglas Kramer (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: