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

后端 未结 8 1844
庸人自扰
庸人自扰 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:15

    You can use the jps utility that is included in the JDK to find the process id of a Java process. The output will show you the name of the executable JAR file or the name of the main class.

    Then use the Windows task manager to terminate the process. If you want to do it on the command line, use

    TASKKILL /PID %PID%
    

提交回复
热议问题