Does Java provide a way to catch signals?
No, Java doesn’t have any model for a signal in the virtual machine. The JVM uses signals internally for its operation and so native methods should generally avoid attempting to send signals or install handlers for signals. In a simple case such as catching a CNTL C and doing a cleanup, you could launch Java from within a Perl script. The Perl script can catch the CNTL C and then signal the JVM by writing to a socket. The application needs to be written so that it is listening on that socket for the signal.