A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Java in General
Checking for a Windows Service from Java
Joined: Jun 05, 2001
Mar 17, 2005 14:14:00
Is there a way from
to determine if a particular windows service
Joined: Feb 23, 2005
Mar 17, 2005 16:14:00
I really don't know what the proper way to do this is, but seeing as it's windows only, you could run the command "net start" and read the output, looking for the service you are interested in.
Joined: Feb 15, 2005
Mar 17, 2005 17:24:00
I agree with Horatio. That sounds like a good way to do it.
If you're not familiar with how to start a process outside the JVM, the call is Runtime.getRuntime().exec("net start");
I'd read the following article, though, before coding this, because there are lots of pitfalls in running processes outside the JVM.
I agree. Here's the link:
subject: Checking for a Windows Service from Java
Listening for connections
tomcat did not get started from eclipse
How to run Java Program as windows service?
How to call oracle reports from JAVA web application
how can we write memory resident program
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015