I want to get the windows shutdown/logoff time by using java.I
had tried
Runtime.getRuntime().addShutdownHook(new Message());
I ran this code,I didn't get shutdown time.
I want to get the windows shutdown/logoff time by using java.I
had tried
Runtime.getRuntime().addShutdownHook(new Message());
I ran this code,I didn't get shutdown time.
The JavaDoc is very clear of the method usage.
It says:
Registers a new virtual-machine shutdown hook.
That means the JVM, not the underlying OS.
You should consider C++ or reading the Windows event log for your requirement.