The changes bring the specifications into alignment with existing long-standing behavior. No changes to the current behavior of OpenJDK are required. It is possible that other implementations will fall out of compliance, though this is unlikely since these behaviors are quite well-established.
Java API, Other
java.lang.Runtime class specification to describe the shutdown sequence.
The shutdown hooks mechanism was added in JDK 1.3. This allowed some special "hooks"
(really, threads) to be run after
System.exit was called but before the JVM actually
terminated. Unfortunately, documentation of the exact behavior of hooks with respect to the actual
shutdown and exit of the JVM was piecemeal, and there were several places in the specifications
that had misleading or out-of-date information, such as statements that "The System.exit() method
terminates the JVM." Similarly out-of-date information was present in the JLS, the JVMS, and the
java.lang.Runtime class specification to define the shutdown sequence, what
causes it to start, and what happens when it finishes (or not). Also make minor adjustments
to various places in
Note that corresponding changes to other specifications are also being made:
See attached specdiff.