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

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -