You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Frank Lawlor <fr...@athensgroup.com> on 2001/10/18 19:31:29 UTC

Catalina as an NT Service

I've seen several queries about running Catalina as an NT
service but didn't find any clear replies, at least regarding
using the jk_nt_service.exe.

I got it working, but it was all pure guesswork.  Maybe
someone who knows something about this can add some
information or, BETTER STILL, add some information to
Catalina about running it as an NT service.

I started with the directions for Tomcat 3.2 and jk_nt_service.exe
http://jakarta.apache.org/tomcat/tomcat-3.2-doc/NT-Service-howto.html

I made the following additions/changes to wrapper.properties:

The only thing I found I needed in the classpath was bootstrap.jar:
wrapper.class_path=$(wrapper.tomcat_home)\bin\bootstrap.jar

The startup class is different:
wrapper.startup_class=org.apache.catalina.startup.Bootstrap

I added some flags and other changes to the startup command.
I didn't test to see if these are really all needed.  The SAXParser
one is probably only needed if your app uses it and you don't 
explicitly name the parser class.  The -Xrs switch is probably only 
needed for JDK 1.3.1 to keep the service from dying (??)   
Note the "start" on the end.
Broken across multiple lines here for clarity:
wrapper.cmd_line=$(wrapper.javabin) 
   -Xrs -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser
   -Dcatalina.home="C:\jakarta-tomcat-4.0-rc2"
   -classpath $(wrapper.class_path) 
   $(wrapper.startup_class)
    -config $(wrapper.server_xml)  start

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.