how can I get a call back when the process in the windows tasklist is killed using java?how can I monitor the event? i want to realize that if process is killed then start auto?
great thanks!
how can I get a call back when the process in the windows tasklist is killed using java?how can I monitor the event? i want to realize that if process is killed then start auto?
great thanks!
Ok you can allocate a thread that every N seconds call the external process
tasklist /v
maybe with a filter on your Window Title or program name.
To launch tasklist
from java you can do
Process p = Runtime.getRuntime().exec("tasklist /v");
BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
and then read the BufferedReader
and check for your process.
Remember to terminate every time the process in the right way.