Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8227370 Remove SharedPathsMiscInfo
  3. JDK-8230291

Release Note: CDS Behavior Change With Non-existent Files During Archive Creation

    Details

    • Subcomponent:
    • Verification:
      Verified

      Description

      In JDK 14, CDS runtime classpath validation is now more forgiving when dealing with files in the classpath that do not exist.

      At CDS archive dump time, all non-existent elements in the classpath are automatically stripped. For example, if the command is:

          java -cp nosuchfile.jar:hello.jar -Xshare:dump \
               -XX:SharedClassListFile=hello.classlist \
               -XX:SharedArchiveFile=hello.jsa

      after removing the non-existing elements, the classpath recorded in `hello.jsa` becomes `hello.jar`.

      Also, at run time, when the CDS archive is loaded, all non-existent elements in the classpath are ignored. With the previous example, all of the following commands will successfully load the archive:

         (1)
      ```
          java -cp nosuchfile.jar:hello.jar -Xshare:on \
               -XX:SharedArchiveFile=hello.jsa \
               Hello
      ```
         (2)
      ```
          java -cp hello.jar -Xshare:on \
               -XX:SharedArchiveFile=hello.jsa \
               Hello
      ```
         (3)
      ```
          java -cp alsonosuchfile.jar:hello.jar -Xshare:on \
               -XX:SharedArchiveFile=hello.jsa \
               Hello
      ```

      In JDK 13 and earlier, only (1) is allowed while (2) and (3) would trigger an error.

        Attachments

          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: