tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arie...@locus.apache.org
Subject cvs commit: jakarta-tomcat/proposals/catalina/src/bin catalina.bat
Date Tue, 18 Apr 2000 15:19:49 GMT
ariedel     00/04/18 08:19:49

  Added:       proposals/catalina/src/bin catalina.bat
  Log:
  Initial start/stop script for Win32. Could be enhanced to perform more automatic directory
lookup.
  
  Currently requires CATALINA_HOME environment variable to be set.
  
  Must be run from root of Catalina build directory. From root build directory, type 'bin\catalina.bat'
  
  Revision  Changes    Path
  1.1                  jakarta-tomcat/proposals/catalina/src/bin/catalina.bat
  
  Index: catalina.bat
  ===================================================================
  @echo off
  rem A batch file to start/stop catalina server.
  rem
  rem This batch file written and tested under Windows NT
  rem Improvements to this file are welcome
  rem
  rem You will need to set JAVA_HOME
  
  rem Guess CATALINA_HOME and TOMCAT_HOME if not present
  
  set catalinahome=%CATALINA_HOME%
  set tomcathome=%TOMCAT_HOME%
  
  if not "%CATALINA_HOME%" == "" goto gotcatalinahome
  
  SET CATALINA_HOME=.
  if exist %CATALINA_HOME%\bin\catalina.bat goto gotcatalinahome
  
  SET CATALINA_HOME=..
  if exist %CATALINA_HOME%\bin\catalina.bat goto gotcatalinahome
  
  SET CATALINA_HOME=
  echo Unable to determine the value of CATALINA_HOME.
  goto cleanup
  
  :gotcatalinahome
  
  echo CATALINA_HOME=%CATALINA_HOME%
  
  if not "%TOMCAT_HOME%" == "" goto gottomcathome
  
  set TOMCAT_HOME=%CATALINA_HOME%\..\tomcat
  if exist %TOMCAT_HOME%\classes goto gottomcathome
  
  SET TOMCAT_HOME=
  echo Unable to determine the value of TOMCAT_HOME.
  goto cleanup
  
  :gottomcathome
  
  echo TOMCAT_HOME=%TOMCAT_HOME%
  
  set cp=%CLASSPATH%
  
  set CLASSPATH=%CATALINA_HOME%\classes
  set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\lib\xml.jar
  set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\classes
  REM set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\servlet.jar
  set CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar
  
  if "%cp%" == "" goto next
  
  rem else
  set CLASSPATH=%CLASSPATH%;%cp%
  
  :next
  if "%1" == "start" goto startServer
  if "%1" == "stop" goto stopServer
  if "%1" == "run" goto runServer
  if "%1" == "env" goto setupEnv
  
  echo Usage:
  echo catalina (start run env stop)
  echo           start - start catalina in a separate window
  echo           run   - start catalina in the current window
  echo           env   - setup the environment for catalina
  echo           stop  - stop catalina
  goto cleanup
  
  :startServer
  echo Starting Catalina in new window
  echo Using classpath: %CLASSPATH%
  start java org.apache.tomcat.startup.Catalina %2 %3 %4 %5 %6 %7 %8 %9
  goto cleanup
  
  :runServer
  rem Start the Catalina Server
  echo cp=%CLASSPATH%
  java org.apache.tomcat.startup.Catalina %2 %3 %4 %5 %6 %7 %8 %9
  goto cleanup
  
  :stopServer
  rem Stop the Catalina Server
  echo Using classpath: %CLASSPATH%
  java org.apache.tomcat.startup.Catalina -stop %2 %3 %4 %5 %6 %7 %8 %9
  goto cleanup
  goto cleanup
  
  :setupEnv
  set cp=%CLASSPATH%
  
  :cleanup
  rem clean up
  
  set CATALINA_HOME=%catalinahome%
  set TOMCAT_HOME=%tomcathome%
  set CLASSPATH=%cp%
  set port=
  set host=
  set test=
  set jsdkJars=
  set jspJars=
  set beanJars=
  set miscJars=
  set appJars=
  set appClassPath=
  set cp=
  
  rem pause
  
  
  

Mime
View raw message