检查Windows服务的运行状态 [英] check windows services running status

查看:95
本文介绍了检查Windows服务的运行状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我需要知道Windows服务的状态.例如,我需要检查一下Textpad.exe服务是否已在运行.任何人都可以帮助找到该甜蛋白.

问候,

sasi

Hi,

i need to know status of the windows services. for example,i need to check it out Textpad.exe service is already running or not. any one can help to find the solutoin.

regards,

sasi

推荐答案

在干净"的Java中是不可能的,但是您可以使用ProcessBuilder [
That is not possible in "clean" Java, but you can use ProcessBuilder[^] to run the command sc query Textpad and then read the output to determine the state of the service


此处: http://www.rgagnon.com/javadetails/java-0610.html [ ^ ]

您可以找到一个小的示例代码来检查当前是否正在执行某个程序.
here: http://www.rgagnon.com/javadetails/java-0610.html[^]

you can find a small example code to checking whether a certain program is currently executed.


这篇关于检查Windows服务的运行状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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