如何在Windows上查找正在运行的Java进程的进程ID?以及如何单独杀死这个过程? [英] How to find the process id of a running Java process on Windows? And how to kill the process alone?

查看:2224
本文介绍了如何在Windows上查找正在运行的Java进程的进程ID?以及如何单独杀死这个过程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Windows中杀死特定的Java进程,比如Linux( ps -aux 获取processid然后 kill processid 杀死进程。)

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).

推荐答案

你可以使用 jps 包含在JRE中的实用程序,用于查找流程Java进程的id。输出将显示可执行JAR文件的名称或主类的名称。

You can use the jps utility that is included in the JRE 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.

然后使用Windows任务管理器终止进程。如果你想在命令行上这样做,请使用

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

TASKKILL /PID %PID%

这篇关于如何在Windows上查找正在运行的Java进程的进程ID?以及如何单独杀死这个过程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆