<div dir="ltr"><div>Hello friends!</div><div><br></div><div>I was doing some testing of AppCDS on JDK 25, in hopes of having our Docker images pre-generate an AppCDS archive. But I discovered an issue... AppCDS does not appear to like the JRuby command line anymore in JDK 25.</div><div><br></div><div>Here's part of a session where I delete the old AppCDS archive and then run the same command line twice with AutoCreateSharedArchive. The archive generates ok in the first command, but then is rejected by the second command:</div><div><br></div><div>[] jdk25 $ rm /Users/headius/work/jruby/lib/jruby-java25.jsa<br>[] jdk25 $ /Library/Java/JavaVirtualMachines/zulu-25.jdk/Contents/Home/bin/java @/Users/headius/work/jruby/bin/.jruby.java_opts @/Users/headius/work/jruby/bin/.jruby.module_opts -Xss2048k -Djffi.boot.library.path=/Users/headius/work/jruby/lib/jni -Djava.security.egd=file:/dev/urandom -XX:+AutoCreateSharedArchive -XX:SharedArchiveFile=/Users/headius/work/jruby/lib/jruby-java25.jsa --enable-native-access=org.jruby.dist --sun-misc-unsafe-memory-access=allow --module-path /Users/headius/work/jruby/lib/jruby.jar -classpath : -Djruby.home=/Users/headius/work/jruby -Djruby.lib=/Users/headius/work/jruby/lib -Djruby.script=jruby -Djruby.shell=/bin/sh org.jruby.Main -e 1<br>[1.074s][warning][cds] Skipping jdk/proxy2/$Proxy13: Unsupported location<br>[1.074s][warning][cds] Skipping jdk/proxy2/$Proxy25: Unsupported location<br>[1.074s][warning][cds] Skipping org/joda/time/field/MillisDurationField: Old class has been linked</div><div>...<br>[1.076s][warning][cds] Skipping org/jruby/org/objectweb/asm/ClassWriter: Old class has been linked<br>[1.076s][warning][cds] Skipping org/joda/time/format/DateTimeFormatterBuilder$PaddedNumber: Old class has been linked<br>[] jdk25 $ /Library/Java/JavaVirtualMachines/zulu-25.jdk/Contents/Home/bin/java @/Users/headius/work/jruby/bin/.jruby.java_opts @/Users/headius/work/jruby/bin/.jruby.module_opts -Xss2048k -Djffi.boot.library.path=/Users/headius/work/jruby/lib/jni -Djava.security.egd=file:/dev/urandom -XX:+AutoCreateSharedArchive -XX:SharedArchiveFile=/Users/headius/work/jruby/lib/jruby-java25.jsa --enable-native-access=org.jruby.dist --sun-misc-unsafe-memory-access=allow --module-path /Users/headius/work/jruby/lib/jruby.jar -classpath : -Djruby.home=/Users/headius/work/jruby -Djruby.lib=/Users/headius/work/jruby/lib -Djruby.script=jruby -Djruby.shell=/bin/sh org.jruby.Main -e 1<br>[0.008s][error][cds] An error has occurred while processing the shared archive file. Run with -Xlog:aot,cds for details.<br>[0.008s][error][cds] optimized module handling: disabled because extra module path(s) are specified<br>[0.008s][error][cds] Mismatched values for property jdk.module.enable.native.access: org.jruby.dist specified during runtime but not during dump time<br>[0.008s][error][cds] Disabling optimized module handling<br>[0.008s][error][cds] Mismatched values for property jdk.module.addopens: java.base/<a href="http://java.io">java.io</a>=org.jruby.dist,java.base/java.nio.channels=org.jruby.dist,java.base/<a href="http://sun.nio.ch">sun.nio.ch</a>=org.jruby.dist,java.management/sun.management=org.jruby.dist specified during runtime but not during dump time<br>[0.008s][error][cds] Disabling optimized module handling<br></div><div><br></div><div>The errors make no sense because I'm doing exactly the same thing in both command lines.</div><div><br></div><div>Here's the contents of the /Users/headius/work/jruby/bin/.jruby.module_opts file (the .jruby.java_opts file is empty):</div><div><br></div><div>--add-opens java.base/<a href="http://java.io">java.io</a>=org.jruby.dist<br>--add-opens java.base/java.nio.channels=org.jruby.dist<br>--add-opens java.base/<a href="http://sun.nio.ch">sun.nio.ch</a>=org.jruby.dist<br>--add-opens java.management/sun.management=org.jruby.dist</div><div><br></div><div>Running the same commands against JDK 21 works just fine... the jsa file is generated and used correctly. Is there something I'm doing wrong with this command line that JDK 25 does not like?</div><div><br></div><div>I can re-test with another JDK if necessary. Let me know if I should open a bug for this.</div><div><br></div><div>Reproduce by downloading JRuby from <a href="https://jruby.org">https://jruby.org</a> and unpacking. It runs out of the box.</div><div><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><b>Charles Oliver Nutter</b><div><i>Architect and Technologist</i></div><div>Headius Enterprises</div><a href="https://www.headius.com" target="_blank">https://www.headius.com</a><div><div><a href="mailto:headius@headius.com" target="_blank">headius@headius.com</a></div></div></div></div></div></div>