RFR: 8359423: Improve error message in case of missing jsa shared archive [v2]

Matthias Baesken mbaesken at openjdk.org
Fri Aug 15 12:20:59 UTC 2025


> In case we use `-Xshare:on` with additional flags (regarding coh or coops) and we have the corresponding jsa archive not present,
> we get this message/error :
> 
> 
> Error occurred during initialization of VM
> Unable to use shared archive.
> 
> 
> The error message could be a little improved, e.g. telling what jsa file is not present .
> For example
> 
> 
> ./images/jdk/bin/java -Xshare:on -version
> [0.017s][error][aot] Opening of static archive /build_linux/images/jdk/lib/server/classes.jsa failed
> Error occurred during initialization of VM
> Unable to use shared archive (unrecoverable archive loading error).

Matthias Baesken has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:

 - Merge remote-tracking branch 'origin/master' into JDK-8359423
 - Adjust log message in metaspaceShared
 - JDK-8359423

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/25846/files
  - new: https://git.openjdk.org/jdk/pull/25846/files/df28ad45..8858819d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=25846&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=25846&range=00-01

  Stats: 100931 lines in 2548 files changed: 54925 ins; 30873 del; 15133 mod
  Patch: https://git.openjdk.org/jdk/pull/25846.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25846/head:pull/25846

PR: https://git.openjdk.org/jdk/pull/25846


More information about the hotspot-runtime-dev mailing list