You will need to roll your decision, I think. You can kill an external process created using the API Processusing Process.destroy(). (But keep in mind that destroy(), as implemented in Linux / Unix, it performs a “soft” kill, not SIGKILL, so an external process can be killed.)
Everything except this is not tolerated.
- Listing processes (on a Linux machine) can be performed by reading the file system
/proc. - Other actions can be performed by calling the native command using
Process. It depends on whether your management functionality requires the use of system calls that are not available for a "clean" Java program. - It is possible (theoretically) to use JNI and native code to search JVM data structures to find the OS level PID for the process and send it a signal.
JNI +, , JVM. .. , , .., .