If I add a shutdown hook to my Java program\'s runtime like so:
public class MyShutdownHook implements Runnable { @Override public void run(
If the process is killed, a shutdown hook will not be executed.
If the process crashes, a shutdown hook will not be executed.
If you have a Windows service and the shutdown hook takes to long to execute, it will be terminated.