[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 Start script for the CATALINA Server |
---|
| 20 | rem |
---|
| 21 | rem $Id: startup.bat 562770 2007-08-04 22:13:58Z markt $ |
---|
| 22 | rem --------------------------------------------------------------------------- |
---|
| 23 | |
---|
| 24 | rem Guess CATALINA_HOME if not defined |
---|
| 25 | set CURRENT_DIR=%cd% |
---|
| 26 | if not "%CATALINA_HOME%" == "" goto gotHome |
---|
| 27 | set CATALINA_HOME=%CURRENT_DIR% |
---|
| 28 | if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome |
---|
| 29 | cd .. |
---|
| 30 | set CATALINA_HOME=%cd% |
---|
| 31 | cd %CURRENT_DIR% |
---|
| 32 | :gotHome |
---|
| 33 | if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome |
---|
| 34 | echo The CATALINA_HOME environment variable is not defined correctly |
---|
| 35 | echo This environment variable is needed to run this program |
---|
| 36 | goto end |
---|
| 37 | :okHome |
---|
| 38 | |
---|
| 39 | set EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat |
---|
| 40 | |
---|
| 41 | rem Check that target executable exists |
---|
| 42 | if exist "%EXECUTABLE%" goto okExec |
---|
| 43 | echo Cannot find %EXECUTABLE% |
---|
| 44 | echo This file is needed to run this program |
---|
| 45 | goto end |
---|
| 46 | :okExec |
---|
| 47 | |
---|
| 48 | rem Get remaining unshifted command line arguments and save them in the |
---|
| 49 | set CMD_LINE_ARGS= |
---|
| 50 | :setArgs |
---|
| 51 | if ""%1""=="""" goto doneSetArgs |
---|
| 52 | set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 |
---|
| 53 | shift |
---|
| 54 | goto setArgs |
---|
| 55 | :doneSetArgs |
---|
| 56 | |
---|
| 57 | call "%EXECUTABLE%" start %CMD_LINE_ARGS% |
---|
| 58 | |
---|
| 59 | :end |
---|