CDS runtime checks the recorded shared class paths as part of the archive validation. The shared classpath checks include:
- Compare the recorded paths string with the runtime paths string
- Compare the recorded size for each JAR file in the shared class paths with the current file size
- Compare the recorded last modified time (mtime) for each JAR file in the shared class paths with the current file mtime
mtime may not be meaningful and not the recorded last modified time in some cases. Path string may be different at dump time and runtime. These could cause false failures during the shared classpath check.
In some environments, we can still ensure an existing CDS shared archive is up-to-date with a release and deployment process for related JAR and JSA files, without the shared classpath checks. In those cases, providing a VM option (e.g. -XX:-ValidateSharedClassPaths) to disable the check would be helpful.