windows - Kill a java process using its Name and not PID -
in java program want kill process named "dummybroker"(which java program). kill using taskkill needs pid of process. how can fetch pid specific java process , kill it?
you should take @ link : killing process using java
and use :
runtime.getruntime().exec("taskkill /f /im <processname>.<extension>")
otherwise can maybe use combinaison of tasklist
and split
find containing line , find pid
.
Comments
Post a Comment