# 01-runtime-behaviour: classes compiled ONCE with JDK 21 (--release 21), run unchanged on JDK 21 and JDK 25 --- SecurityManagerProbe [21.0.13.1] setSecurityManager: UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release [25.0.5.1] setSecurityManager: UnsupportedOperationException: Setting a Security Manager is not supported --- SubjectProbe [21.0.13.1] Subject.getSubject: returned null [21.0.13.1] Subject.current(): returned null [25.0.5.1] Subject.getSubject: UnsupportedOperationException: getSubject is not supported [25.0.5.1] Subject.current(): returned null --- ThreadControlProbe [21.0.13.1] suspend() java.lang.UnsupportedOperationException [21.0.13.1] resume() java.lang.UnsupportedOperationException [21.0.13.1] stop() java.lang.UnsupportedOperationException [25.0.5.1] suspend() java.lang.NoSuchMethodError: 'void java.lang.Thread.suspend()' [25.0.5.1] resume() java.lang.NoSuchMethodError: 'void java.lang.Thread.resume()' [25.0.5.1] stop() java.lang.UnsupportedOperationException --- UnsafeProbe [21.0.13.1] read back: 42 [25.0.5.1] WARNING: A terminally deprecated method in sun.misc.Unsafe has been called [25.0.5.1] WARNING: sun.misc.Unsafe::allocateMemory has been called by UnsafeProbe (file:/c21/) [25.0.5.1] WARNING: Please consider reporting this to the maintainers of class UnsafeProbe [25.0.5.1] WARNING: sun.misc.Unsafe::allocateMemory will be removed in a future release [25.0.5.1] read back: 42 --- JniProbe [21.0.13.1] System.loadLibrary("net") returned [25.0.5.1] WARNING: A restricted method in java.lang.System has been called [25.0.5.1] WARNING: java.lang.System::loadLibrary has been called by JniProbe in an unnamed module (file:/c21/) [25.0.5.1] WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module [25.0.5.1] WARNING: Restricted methods will be blocked in a future release unless native access is enabled [25.0.5.1] System.loadLibrary("net") returned --- FinalizerProbe [21.0.13.1] finalize() ran: true [25.0.5.1] finalize() ran: true --- DefaultsProbe [21.0.13.1] java.version = 21.0.13.1 [21.0.13.1] availableProcessors = 2 [21.0.13.1] maxMemory MiB = 1536 [21.0.13.1] collector bean: G1 Young Generation [21.0.13.1] collector bean: G1 Concurrent GC [21.0.13.1] collector bean: G1 Old Generation [21.0.13.1] UseCompactObjectHeaders = (no such flag in this JVM) [21.0.13.1] ZGenerational = false [25.0.5.1] java.version = 25.0.5.1 [25.0.5.1] availableProcessors = 2 [25.0.5.1] maxMemory MiB = 1536 [25.0.5.1] collector bean: G1 Young Generation [25.0.5.1] collector bean: G1 Concurrent GC [25.0.5.1] collector bean: G1 Old Generation [25.0.5.1] UseCompactObjectHeaders = false [25.0.5.1] ZGenerational = (no such flag in this JVM) --- SecurityManagerProbe with -Djava.security.manager=allow [21.0.13.1] setSecurityManager: installed = true [25.0.5.1] Error occurred during initialization of VM [25.0.5.1] java.lang.Error: A command line option has attempted to allow or enable the Security Manager. Enabling a Security Manager is not supported. --- UnsafeProbe on 25 with --sun-misc-unsafe-memory-access=deny [25.0.5.1] failed: UnsupportedOperationException: allocateMemory --- UnsafeProbe on 25 with --sun-misc-unsafe-memory-access=debug [25.0.5.1] WARNING: sun.misc.Unsafe::allocateMemory called by UnsafeProbe (file:/c21/) [25.0.5.1] at UnsafeProbe.main(UnsafeProbe.java:11) [25.0.5.1] WARNING: sun.misc.Unsafe::putLong called by UnsafeProbe (file:/c21/) [25.0.5.1] at UnsafeProbe.main(UnsafeProbe.java:12) [25.0.5.1] WARNING: sun.misc.Unsafe::getLong called by UnsafeProbe (file:/c21/) [25.0.5.1] at UnsafeProbe.main(UnsafeProbe.java:13) [25.0.5.1] read back: 42 [25.0.5.1] WARNING: sun.misc.Unsafe::freeMemory called by UnsafeProbe (file:/c21/) [25.0.5.1] at UnsafeProbe.main(UnsafeProbe.java:14) --- JniProbe on 25 with --enable-native-access=ALL-UNNAMED [25.0.5.1] System.loadLibrary("net") returned --- JniProbe on 25 with --illegal-native-access=deny [25.0.5.1] failed: IllegalCallerException: Illegal native access from an unnamed module (file:/c21/) --- FinalizerProbe on 25 with --finalization=disabled [25.0.5.1] finalize() ran: false