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

-classpath/-sourcepath options issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • tbd
    • 9
    • tools

      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;
                      }
                  }
      ..................

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

              Created:
              Updated:
              Resolved: