A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Arduino in Action
this week in the
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
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 Java 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:
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: Checking for a Windows Service from Java
how can we write memory resident program
How to call oracle reports from JAVA web application
How to run Java Program as windows service?
tomcat did not get started from eclipse
Listening for connections
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013