Killing a Java process from another Java process

Hi

Is there a possible way of sending a SIGINT, SIGKILL, or any other signal from a Java process running in one JVM, to a java process running in a different JVM on the same machine.

I've the signal handlers written in my process and they do respond to singals (e.g. on pressing Ctrl-C) on the console, but i want to write a separate program that sends this signal to the first process.

Any ideas?

Thanks in advance and regards

Kashif

[486 byte] By [kdastgir] at [2007-9-26 2:18:55]
# 1
The answer, as always, is that Java can't do operating-system-specific things like that, but you can use JNI to do it. However, if your code created the Java process you want to kill, via Process p = Runtime.getRuntime().exec(...), then you can use p.destroy() to kill it.
DrClap at 2007-6-29 9:20:35 > top of Java-index,Java HotSpot Virtual Machine,Specifications...