Does Shutdown Hooks run when a computer shut down? I saw a post about this from a while back, and it is from 2015... so it makes me think that this could have been fixed/changed since then. If not, how should I do this, without causing any issues?
EDIT: I have done some testing myself and found that it does not run on system shut down. Using this:
Runtime.getRuntime().addShutdownHook(new Thread() {
public void run() {
//some code here
}
});
I am using this so I could be able to disable some token/key that was generated at the start of the program. If I cannot disable the token at the end of the program, things will get all messed up...
Thanks for any input given!