| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 | @echo offrem Licensed to the Apache Software Foundation (ASF) under one or morerem contributor license agreements.  See the NOTICE file distributed withrem this work for additional information regarding copyright ownership.rem The ASF licenses this file to You under the Apache License, Version 2.0rem (the "License"); you may not use this file except in compliance withrem the License.  You may obtain a copy of the License atremrem     http://www.apache.org/licenses/LICENSE-2.0remrem Unless required by applicable law or agreed to in writing, softwarerem distributed under the License is distributed on an "AS IS" BASIS,rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.rem See the License for the specific language governing permissions andrem limitations under the License.rem ---------------------------------------------------------------------------rem Wrapper script for command line toolsremrem Environment Variable Prerequisitesremrem   CATALINA_HOME   May point at your Catalina "build" directory.remrem   TOOL_OPTS       (Optional) Java runtime options.remrem   JAVA_HOME       Must point at your Java Development Kit installation.rem                   Using JRE_HOME instead works as well.remrem   JRE_HOME        Must point at your Java Runtime installation.rem                   Defaults to JAVA_HOME if empty. If JRE_HOME and JAVA_HOMErem                   are both set, JRE_HOME is used.remrem   JAVA_OPTS       (Optional) Java runtime options.remrem   JAVA_ENDORSED_DIRS (Optional) Lists of of semi-colon separated directoriesrem                   containing some jars in order to allow replacement of APIsrem                   created outside of the JCP (i.e. DOM and SAX from W3C).rem                   It can also be used to update the XML parser implementation.rem                   This is only supported for Java <= 8.rem                   Defaults to $CATALINA_HOME/endorsed.rem ---------------------------------------------------------------------------setlocalrem Guess CATALINA_HOME if not definedset "CURRENT_DIR=%cd%"if not "%CATALINA_HOME%" == "" goto gotHomeset "CATALINA_HOME=%CURRENT_DIR%"if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHomecd ..set "CATALINA_HOME=%cd%"cd "%CURRENT_DIR%":gotHomeif exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHomeecho The CATALINA_HOME environment variable is not defined correctlyecho This environment variable is needed to run this programgoto end:okHomerem Ensure that any user defined CLASSPATH variables are not used on startup,rem but allow them to be specified in setenv.bat, in rare case when it is needed.set CLASSPATH=rem Get standard environment variablesif exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat"rem Get standard Java environment variablesif exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspathecho Cannot find "%CATALINA_HOME%\bin\setclasspath.bat"echo This file is needed to run this programgoto end:okSetclasspathcall "%CATALINA_HOME%\bin\setclasspath.bat" %1if errorlevel 1 goto endrem Add on extra jar files to CLASSPATHrem Note that there are no quotes as we do not want to introduce randomrem quotes into the CLASSPATHif "%CLASSPATH%" == "" goto emptyClasspathset "CLASSPATH=%CLASSPATH%;":emptyClasspathset "CLASSPATH=%CLASSPATH%%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_HOME%\bin\tomcat-juli.jar;%CATALINA_HOME%\lib\servlet-api.jar;%CATALINA_HOME%\lib\tomcat-util.jar"set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManagerrem Java 9 no longer supports the java.endorsed.dirsrem system property. Only try to use it ifrem JAVA_ENDORSED_DIRS was explicitly setrem or CATALINA_HOME/endorsed exists.set ENDORSED_PROP=ignore.endorsed.dirsif "%JAVA_ENDORSED_DIRS%" == "" goto noEndorsedVarset ENDORSED_PROP=java.endorsed.dirsgoto doneEndorsed:noEndorsedVarif not exist "%CATALINA_HOME%\endorsed" goto doneEndorsedset ENDORSED_PROP=java.endorsed.dirs:doneEndorsedrem Get remaining unshifted command line arguments and save them in theset CMD_LINE_ARGS=:setArgsif ""%1""=="""" goto doneSetArgsset CMD_LINE_ARGS=%CMD_LINE_ARGS% %1shiftgoto setArgs:doneSetArgs%_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS%:end
 |