本文发表在 rolia.net 枫下论坛How to install tomcat as a windowxp service:
1.set up java_home and catalina_home:
for example:
JAVA_HOME=d:\j2sdk
CATALINA_HOME=d:\tomcat-4.1
On windowsXP, you can add them to the system variables of your computer.
Just click on start->control panel->system->advanced->environment variables->system variables->new
In next pop up winwindow, type JAVA_HOME or CATALINA_HOME, and the path of the folder you installed java SDK and tomcat.
In the example above, they are d:\j2sdk, and d:\tomcat-4.1 respectively.
2.Copy this line to a DOS window(must be one line), and press enter:
%CATALINA_HOME%\bin\tomcat -install "Jakarta Tomcat 4" %JAVA_HOME%\jre\bin\server\jvm.dll -Djava.class.path=%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar -Dcatalina.home=%CATALINA_HOME% -Xrs -start org.apache.catalina.startup.Bootstrap -params start -stop org.apache.catalina.startup.Bootstrap -params stop -out %CATALINA_HOME%\logs\stdout.log
-err %CATALINA_HOME%\logs\stderr.log
you must change %CATALINA_HOME% to the path of tomcat, for example,d:\tomcat-4.1
and replace %JAVA_HOMEd%, for example, by d:\j2sdk.更多精彩文章及讨论,请光临枫下论坛 rolia.net
1.set up java_home and catalina_home:
for example:
JAVA_HOME=d:\j2sdk
CATALINA_HOME=d:\tomcat-4.1
On windowsXP, you can add them to the system variables of your computer.
Just click on start->control panel->system->advanced->environment variables->system variables->new
In next pop up winwindow, type JAVA_HOME or CATALINA_HOME, and the path of the folder you installed java SDK and tomcat.
In the example above, they are d:\j2sdk, and d:\tomcat-4.1 respectively.
2.Copy this line to a DOS window(must be one line), and press enter:
%CATALINA_HOME%\bin\tomcat -install "Jakarta Tomcat 4" %JAVA_HOME%\jre\bin\server\jvm.dll -Djava.class.path=%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar -Dcatalina.home=%CATALINA_HOME% -Xrs -start org.apache.catalina.startup.Bootstrap -params start -stop org.apache.catalina.startup.Bootstrap -params stop -out %CATALINA_HOME%\logs\stdout.log
-err %CATALINA_HOME%\logs\stderr.log
you must change %CATALINA_HOME% to the path of tomcat, for example,d:\tomcat-4.1
and replace %JAVA_HOMEd%, for example, by d:\j2sdk.更多精彩文章及讨论,请光临枫下论坛 rolia.net