How to find the process id of a running Java process on Windows? And how to kill the process alone?

后端 未结 8 1795
庸人自扰
庸人自扰 2021-01-30 21:59

I want to kill the particular Java process in Windows, like in Linux (ps -aux to get processid and then kill processid to kill the process).

8条回答
  •  野性不改
    2021-01-30 22:12

    This will work even when there are multiple instance of jar is running

    wmic Path win32_process Where "CommandLine Like '%yourname.jar%'" Call Terminate
    

提交回复
热议问题