On Thu, 17 Feb 2005 15:24:43 -0600, Hay, Markus <[EMAIL PROTECTED]> wrote: > Hi, > > Does "service.bat" come with 4.1.30? I have the .exe and the .zip > version and neither contain this file.
*slaps forehead* Forgot about that... for 4.X I rolled my own batch file, which is attached as a .txt (well hopefully iunless it gets stripped), the file is a bit hacky but does the job, alternatively the one distributed with 5.5 may actually work okay. Regards, -- Jason Bainbridge KDE - Conquer Your Desktop - http://kde.org KDE Web Team - [EMAIL PROTECTED]
@echo off rem --------------------------------------------------------------------------- rem ntservice.bat - script to install/remove the Tomcat ntservice rem rem Unfortunately a line in this file needs to be changed as I can't find a way rem to get the current working directory rem rem the line in question is: rem set CATALINA_HOME=C:\PROGRA~1\Tomcat4 rem rem nb. if using with a different JRE other than Sun's JRE 1.3.1 then you may need to rem change the path to jvm.dll as well (why can't any company conform to any sort of standard?) rem rem this needs to be changed to the path this instance of Tomcat is installed in. rem rem To Install: ntservice install -name "Service Name Desired" rem rem To remove: ntservice remove -name "Service to remove" rem rem Jason B. 28/03/2002 rem --------------------------------------------------------------------------- rem ----- Save Environment Variables That May Change-------------------------- set _CATALINA_BASE=%CATALINA_BASE% set _CATALINA_HOME=%CATALINA_HOME% set _CLASSPATH=%CLASSPATH% set _CP=%CP% rem CHANGE THE FOLLOWING LINE ONLY set CATALINA_HOME=C:\PROGRA~1\TomcatTest rem CHANGE THE ABOVE LINE ONLY rem ----- Verify and Set Required Environment Variables----------------------- set CATALINA_BASE=%CATALINA_HOME% rem ----- Different JRE's have this in different spots don't ask why set _JAVADLL="%JAVA_HOME%\bin\hotspot\jvm.dll" rem ----- Set Up The Runtime Classpath---------------------------------------- set CP=%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_HOME%\bin\tools.jar set CLASSPATH=%CP% echo Using CATALINA_BASE: %CATALINA_BASE% echo Using CATALINA_HOME: %CATALINA_HOME% echo Using CLASSPATH: %CLASSPATH% echo Using JAVA_HOME: %JAVA_HOME% echo Using JAVADLL: %_JAVADLL% rem ----- Set up the name of the Server--------------------------------------- if "%2" == "-name" goto givenName3 if "%3" == "-name" goto givenName4 set _NAME="Tomcat 4.0.1" goto execute :givenName3 set _NAME=%3 goto execute :givenName4 set _NAME=%4 rem ----- Execute The Requested Command--------------------------------------- :execute if "%1" == "install" goto doInstall if "%1" == "remove" goto doRemove :doUsage echo Usage: ntservice ( install ^| remove ) [-name service] echo Commands: echo install - Installs the Tomcat Nt Service echo remove - Removes the Tomcat Nt Service goto cleanup :doInstall if "%2" == "-security" goto doInstallSecure if "%4" == "-security" goto doInstallSecure tomcat -install %_NAME% %_JAVADLL% "-Djava.class.path=%CLASSPATH%" "-Dcatalina.base=%CATALINA_BASE%" "-Dcatalina.home=%CATALINA_HOME%" -start org.apache.catalina.startup.Bootstrap -params start -stop org.apache.catalina.startup.Bootstrap -params stop -out "%CATALINA_BASE%\logs\service.out.txt" -err "%CATALINA_BASE%\logs\service.err.txt" -current "%CATALINA_BASE%" goto cleanup :doInstallSecure tomcat -install %_NAME% %_JAVADLL% "-Djava.class.path=%CLASSPATH%" "-Djava.security.manager" "-Djava.security.policy==%CATALINA_BASE%/conf/catalina.policy" "-Dcatalina.base=%CATALINA_BASE%" "-Dcatalina.home=%CATALINA_HOME%" -start org.apache.catalina.startup.Bootstrap -params start -stop org.apache.catalina.startup.Bootstrap -params stop -out "%CATALINA_BASE%\logs\service.out.txt" -err "%CATALINA_BASE%\logs\service.err.txt" -current "%CATALINA_BASE%" goto cleanup :doRemove tomcat -uninstall %_NAME% rem ----- Restore Environment Variables--------------------------------------- :cleanup set CATALINA_BASE=%_CATALINA_BASE% set _CATALINA_BASE= set CATALINA_HOME=%_CATALINA_HOME% set _CATALINA_HOME= set CLASSPATH=%_CLASSPATH% set _CLASSPATH= set CP=%_CP% set _LIBJARS= set _JAVADLL= set _NAME= echo :finish
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
