yck
yck

Reputation: 33

Java shutdown hook not fully finished when windows shutdown

I have a Java program that running on Windows 10 enviroment. When I shutdown Windows, I want my program to close gracefully using Java shutdown hook. The problem is, windows(or JVM) does not let my program to finish shutdown hook code block. Is there any way to delay shutting down windows until my shutdown hook is finished?

Note: I cannot make any shorter my hook code. It is handling some critical mechanishms.

Thanks in advance

Upvotes: 0

Views: 408

Answers (0)

Related Questions