Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to run Java Program as windows service?

 
Gul Khan
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Cud u be a bit clear or give some example?

Cheers,
Swamy
 
Gul Khan
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
google
"windows nt" "service wrapper" java
and there is a host of products to do this.

Pete
 
Ali Hassaan
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ali. Will work on that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic