-Xbootclasspath/a breaks exploded build

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 9
    • Affects Version/s: 9
    • Component/s: hotspot
    • b131
    • Verified

      With -Xbootclasspath/a:<path> specified the VM can't find classes in exploded modules. The problem is that <path> is prepended to the list of exploded modules:

      (lldb) p ClassLoader::print_bootclasspath()
      [bootclasspath= .../jdk/modules/java.base ;<path> ;.../jdk/modules/java.logging ;... ;.../jdk/modules/java.xml ;]

      and ClassLoader::load_class() doesn't look past java.base:

      ClassLoader::load_class(name=..., search_append_only=false, ...)

        ClassPathEntry* e = (search_append_only ? _first_append_entry : _first_entry);
        ClassPathEntry* last_e =
            (search_append_only || DumpSharedSpaces ? NULL : _first_append_entry);

          while ((e != NULL) && (e != last_e)) {
      ...
             e = e->next();
            ++classpath_index;
          }
        }

      where:
        _first_entry == java.base
        _first_append_entry = <path>

            Assignee:
            Lois Foltan
            Reporter:
            Vladimir Ivanov
            Votes:
            4 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: