This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I want to write a java program that checks the status of a particular service (whether its running or not). If service is not running then i want to run that service. Is it possible in java? If so, please guide me with where to start with. Any api or links will be greatly appreciated.
Services written by you? If yes, write/run them as threads, and check if the thread has terminated or not (like serviceThread == Thread.State.TERMINATED.)
This should help?
ASCII silly question, Get a silly ANSI.
Joined: Dec 20, 2005
Thanks for your reply. I am working on linux. I have one c++ program which i wrote, i am running this as a service. Now i want to write a java program that checks whether is service is up or down. If service is down, then i want to restart this service. Now as per your reply, i didnt understand your reply. how to create a service thread?