aspose file tools*
The moose likes Servlets and the fly likes tomcat working as a service? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "tomcat working as a service?" Watch "tomcat working as a service?" New topic
Author

tomcat working as a service?

Jim Wang
Ranch Hand

Joined: Oct 04, 2001
Posts: 41
Hi,
I'm using tomcat as my web server. How can I make it working like a background service?
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

What version of Tomcat, and what OS are you using?
Jim Wang
Ranch Hand

Joined: Oct 04, 2001
Posts: 41
I'm using tomcat-3.2.1 on windows 2000 perfessional.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

I'm not sure about Tomcat 3.2.1

I use Win2k, and both 3.2.1 and 4.0.1 versions of Tomcat.

If you download the exe distribution of Tomcat 4.0.1, the installer will ask if you want to install Tomcat as a service. So there is one option.

The other option is to put Tomcat in your startup group, which is a total fake-out, but at least it starts and runs when your computer does ... although only *after* you complete the login.

To run it as a true service, you would need to investigate which entries in the registry you need to make. In my former life as a VB programmer, it was a relatively easy thing to make a small dll run as a service, it was a few entries in the registry , and voila.. you had a service. But perhaps there's a lot of COM stuff being hidden by VB, and maybe to get a java app to run as a service is more difficult?
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

wow, isn't www.google.com awesome?!

my search: http://www.google.com/search?q=run+java+program+as+windows+service

some promising results?: http://www.winwinsoft.com/goodies/RunExeSvc/ http://dcbforum.sun.com/thread.jsp?forum=8&thread=289
Dorj Galaa
Ranch Hand

Joined: May 29, 2001
Posts: 113
download jk_nt_service.exe from www.apache.org


Senior software engineer
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

*smacks himself on forehead*
http://jakarta.apache.org/tomcat/tomcat-3.2-doc/NT-Service-howto.html http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.3/bin/win32/i386/jk_nt_service.exe

Thank you Dorj!
[This message has been edited by Mike Curwen (edited October 25, 2001).]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: tomcat working as a service?