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

Incorrect warning from cds about the modules file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 22
    • 21
    • hotspot
    • 20
    • b27

      When the modules file used at run time differs in size from the one used at build time, the warning is confusing:

      $ .../bin/java -jar .../demo/jfc/Notepad/Notepad.jar
      [0.033s][warning][cds] A jar file is not the one used while building the shared archive file: /.../lib/modules
      [0.033s][warning][cds] A jar file is not the one used while building the shared archive file: /.../lib/modules
      [0.033s][warning][cds] /.../lib/modules timestamp has changed.

      First, it refers to the file as a "jar file", which it is not. Also, it complaints about the timestamp, while actually the reason for the warning is the difference in size.

      To reproduce:
      1. build a JDK image with --enable-cds
      2. build or download a different version of a JDK image
      3. replace the .../lib/modules file in the first with the corresponding file from the second, making sure they differ in size
      4. run any Java app using java from the first image
      5. observe the warning

            mkartashev Maxim Kartashev
            mkartashev Maxim Kartashev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: