How to send SIGINT signal from Java to an external process?-Collection of common programming errors

Can you send kill -SIGINT to the process (given that you know the process ID):

Runtime.getRuntime().exec("kill -SIGINT 12345");

Of course, that would make for a platform-dependent solution… Potentially, you’ll be able to use this tool, although it is in “sandbox mode”. But it might give you an idea:

http://commons.apache.org/sandbox/runtime/

See also this related question here:

how can I kill a Linux process in java with SIGKILL Process.destroy() does SIGTERM