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

Improve error message when CDS is not supported on exploded build

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 11
    • 10
    • hotspot
    • b01

      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".

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

              Created:
              Updated:
              Resolved: