I have a Java application with a final hook. The shutdown key is executed when I launch the application in IntelliJ and click the Exit button (as opposed to the Stop button, which does not exit ).
I need to disconnect a process from a Windows batch file. I tried various combinations of the taskkill without luck (assuming PID 1234):
taskkill /pid 1234 /t taskkill /pid 1234 /f /t
Is there a way to terminate the Java process from the MS batch file and execute Java shutdown hooks ?
The application runs on a Windows server.
source share