I have a GUI in Java. This GUI starts a process (running a perl code) in a new thread.
What I would like to do is to kill/destroy this process while it is running.
I tried the following but it didn't work:
This is how I start the process in the CheckRunner.java class . (this is not in the same thread with the gui)
mtcheck_process = mtcheck_runtime.exec(execCmd, environment);
In the gui thread (in the event handler), I have a event handler for a button, and when I hit this button I do this:
But, in the console I can still see that process is running.
How can I destroy this process so that it does not continue?