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 tasklistand split find containing line , find pid.


Comments

Popular posts from this blog

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -