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

Improve error message when CDS is not supported on exploded build

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 10
    • Fix Version/s: 11
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b01

      Description

      Background: as part of the JDK build process, an "exploded build" is created. On Linux, the exploded build can be invoked as ./jdk/bin/java in the build output directory:

          $ ./jdk/bin/java -version
          java version "10-internal"
          Java(TM) SE Runtime Environment (build 10-internal+0-adhoc.iklam.open)
          Java HotSpot(TM) 64-Bit Server VM (build 10-internal+0-adhoc.iklam.open, mixed mode)

      The exploded build can be used to to most things that a regular JDK can do. However, it does not have a lib/modules file does not support CDS. When the user attempts to use CDS operations, it fails as expected, but the error message is confusing:

          $ ./jdk/bin/java -Xshare:dump
          Error: non-empty directory '/jdk/bld/cons/jdk/modules/java.base'
          Hint: enable -Xlog:class+path=info to diagnose the failure
          Error occurred during initialization of VM
          CDS allows only empty directories in archived classpaths

      It should say something like "CDS is not supported in exploded JDK build".

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              iklam Ioi Lam
              Reporter:
              iklam Ioi Lam
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: