How to catch system call in JAVA?

I want to catch an exception (or something else) when my program is killed by the kill command from the operating system.

I want to send a message to the log file before closing.

Is there any way to do this?

thanks

+4
source share
1 answer

Try adding a terminating call.

+6
source

Source: https://habr.com/ru/post/1399001/


All Articles