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

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

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

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