[66] | 1 | @echo off |
---|
| 2 | rem Licensed to the Apache Software Foundation (ASF) under one or more |
---|
| 3 | rem contributor license agreements. See the NOTICE file distributed with |
---|
| 4 | rem this work for additional information regarding copyright ownership. |
---|
| 5 | rem The ASF licenses this file to You under the Apache License, Version 2.0 |
---|
| 6 | rem (the "License"); you may not use this file except in compliance with |
---|
| 7 | rem the License. You may obtain a copy of the License at |
---|
| 8 | rem |
---|
| 9 | rem http://www.apache.org/licenses/LICENSE-2.0 |
---|
| 10 | rem |
---|
| 11 | rem Unless required by applicable law or agreed to in writing, software |
---|
| 12 | rem distributed under the License is distributed on an "AS IS" BASIS, |
---|
| 13 | rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
| 14 | rem See the License for the specific language governing permissions and |
---|
| 15 | rem limitations under the License. |
---|
| 16 | |
---|
| 17 | if "%OS%" == "Windows_NT" setlocal |
---|
| 18 | rem --------------------------------------------------------------------------- |
---|
| 19 | rem Wrapper script for command line tools |
---|
| 20 | rem |
---|
| 21 | rem Environment Variable Prequisites |
---|
| 22 | rem |
---|
| 23 | rem CATALINA_HOME May point at your Catalina "build" directory. |
---|
| 24 | rem |
---|
| 25 | rem TOOL_OPTS (Optional) Java runtime options used when the "start", |
---|
| 26 | rem "stop", or "run" command is executed. |
---|
| 27 | rem |
---|
| 28 | rem JAVA_HOME Must point at your Java Development Kit installation. |
---|
| 29 | rem |
---|
| 30 | rem JAVA_OPTS (Optional) Java runtime options used when the "start", |
---|
| 31 | rem "stop", or "run" command is executed. |
---|
| 32 | rem |
---|
| 33 | rem $Id: tool-wrapper.bat 562770 2007-08-04 22:13:58Z markt $ |
---|
| 34 | rem --------------------------------------------------------------------------- |
---|
| 35 | |
---|
| 36 | rem Guess CATALINA_HOME if not defined |
---|
| 37 | if not "%CATALINA_HOME%" == "" goto gotHome |
---|
| 38 | set CATALINA_HOME=. |
---|
| 39 | if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome |
---|
| 40 | set CATALINA_HOME=.. |
---|
| 41 | :gotHome |
---|
| 42 | if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome |
---|
| 43 | echo The CATALINA_HOME environment variable is not defined correctly |
---|
| 44 | echo This environment variable is needed to run this program |
---|
| 45 | goto end |
---|
| 46 | :okHome |
---|
| 47 | |
---|
| 48 | rem Get standard environment variables |
---|
| 49 | if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat" |
---|
| 50 | |
---|
| 51 | rem Get standard Java environment variables |
---|
| 52 | if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath |
---|
| 53 | echo Cannot find %CATALINA_HOME%\bin\setclasspath.bat |
---|
| 54 | echo This file is needed to run this program |
---|
| 55 | goto end |
---|
| 56 | :okSetclasspath |
---|
| 57 | set BASEDIR=%CATALINA_HOME% |
---|
| 58 | call "%CATALINA_HOME%\bin\setclasspath.bat" |
---|
| 59 | |
---|
| 60 | rem Add on extra jar files to CLASSPATH |
---|
| 61 | if "%CLASSPATH%" == "" goto noclasspath |
---|
| 62 | set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar;"%BASEDIR%"\lib\servlet-api.jar |
---|
| 63 | goto :okclasspath |
---|
| 64 | :noclasspath |
---|
| 65 | set CLASSPATH=%CATALINA_HOME%\bin\bootstrap.jar;"%BASEDIR%"\lib\servlet-api.jar |
---|
| 66 | :okclasspath |
---|
| 67 | |
---|
| 68 | rem Get remaining unshifted command line arguments and save them in the |
---|
| 69 | set CMD_LINE_ARGS= |
---|
| 70 | :setArgs |
---|
| 71 | if ""%1""=="""" goto doneSetArgs |
---|
| 72 | set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 |
---|
| 73 | shift |
---|
| 74 | goto setArgs |
---|
| 75 | :doneSetArgs |
---|
| 76 | |
---|
| 77 | %_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS% |
---|
| 78 | |
---|
| 79 | :end |
---|