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

-classpath/-sourcepath options issue

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Cannot Reproduce
    • Affects Version/s: 9
    • Fix Version/s: tbd_minor
    • Component/s: tools
    • Labels:

      Description

      According to http://docs.oracle.com/javase/8/docs/technotes/tools/windows/javadoc.html#CHDGAHAJ:
      "If you want to search for source and class files in separate paths, then use both -sourcepath and -classpath. For example, if you want to document com.mypackage, whose source files reside in the directory \user\src\com\mypackage, and if this package relies on a library in , \user\lib, then you would use the following command:
      javadoc -sourcepath \user\lib -classpath \user\src com.mypackage"

      The handlers of both options just overwrite the same "sourcepath" variable so this definitely cannot work as described above:
      ..................
                  new Hidden(this, "classpath", 1) {
                      @Override
                      public boolean process(String opt, ListIterator<String> args) {
                          if (sourcepath.length() == 0) {
                              optionsProcessed.add(this);
                              sourcepath = args.next();
                          }
                          return true;
                      }
                  },
      ..................
                  new Hidden(this, "sourcepath", 1) {
                      @Override
                      public boolean process(String opt, ListIterator<String> args) {
                          optionsProcessed.add(this);
                          sourcepath = args.next();
                          return true;
                      }
                  }
      ..................

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              ogb Oleg Barbashov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: