Class ShutdownHookExamples
java.lang.Object
net.jrodolfo.java_evolution.java03.shutdown_hooks.ShutdownHookExamples
Demonstrates JVM shutdown hooks, introduced in J2SE 1.3.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidvoidregisterMarkerFileHook(File markerFile, String message) Registers a shutdown hook that writes a marker file during orderly JVM shutdown.intrunChildProcessMode(String[] args) Entry point used by the test suite's child JVM.
-
Field Details
-
MARKER_MESSAGE
- See Also:
-
-
Constructor Details
-
ShutdownHookExamples
public ShutdownHookExamples()
-
-
Method Details
-
registerMarkerFileHook
-
runChildProcessMode
Entry point used by the test suite's child JVM.- Parameters:
args- first argument is the marker file path- Returns:
- process exit code
-
main
-