aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes How to run Java Program as windows service? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "How to run Java Program as windows service?" Watch "How to run Java Program as windows service?" New topic
Author

How to run Java Program as windows service?

Gul Khan
Ranch Hand

Joined: Sep 03, 2003
Posts: 173
Hi
Can anyone let me know how to set a java program as a windows service. any resources? Any kind of help.


Thanks.
Ramaswamy Srinivasan
Ranch Hand

Joined: Aug 31, 2004
Posts: 295
Hi,

Cud u be a bit clear or give some example?

Cheers,
Swamy
Gul Khan
Ranch Hand

Joined: Sep 03, 2003
Posts: 173
Okie I have a JMS Client which should start listening as soon as the windows is started.
One way probably to do it would be just to put the bat file running the program in startup BUT there should be an option for the user to OFF the service and re-start it without restarting the system.
So for that I think the solution will be to run it as windows service, that is the first problem on how to do it.

I hope that is clear enough . Thanks for replying
Pete Kirkham
Greenhorn

Joined: Sep 08, 2004
Posts: 3
google
"windows nt" "service wrapper" java
and there is a host of products to do this.

Pete
Ali Hassaan
Ranch Hand

Joined: May 16, 2001
Posts: 103
Pervaiz,

Its very simple.. You first make executable file from your Java file..
you can make it via J2Exe or if you are using JBuilder 9.. then you can make it via JBuilder tool..
Secondly, get "srvany" from google search.. its very commonly used service converter.. it will make service of your exe file..
Gul Khan
Ranch Hand

Joined: Sep 03, 2003
Posts: 173
Thanks Ali. Will work on that.
 
Don't get me started about those stupid light bulbs.
 
subject: How to run Java Program as windows service?