Possible Duplicate:
How to check if a service is running via batch file and start it, if it is not running?
Determine if Tomcat is running in Windows using the command prompt
Is there a way to check if Tomcat service (or any service for that matter) is running/stopped in Windows OS through a Java program running through Windows scheduler? If stopped I have to start that service?