Best way to kill a non java process from java?

I have a java application which is responsible for auditing a separate java application, and a c++ application (neither of which it has Process object's for) If i want to kill either of these processes what is the best way to do this from my java application? A native call? batch script? can it be done from pure java?

Dont ask me WHY i did it this way, because i am working with existing code for this one.

thanks for your help.

Dan

[460 byte] By [dbresstecore] at [2007-9-30 19:39:35]
# 1

It will be OS dependent and requires that you have some way to indentify the processes.

Native will give you the most control.

You can find OS tools, at least for unix and windows, which will allow you do this via the command line. Unix comes with them, windows you will normally have to add them.

Ideally the apps would also provide a way to safely stop thems selves, probably via a socket. If so that should be attempted first.

jschell at 2007-7-7 0:24:22 > top of Java-index,Administration Tools,Sun Connection...