@echo off
if "%OS%" == "Windows_NT" setlocal
set PROGRAMROOT=%cd%
if exist "%PROGRAMROOT%/jre" goto okJREHome
:okJREHome
set JRE_HOME=%PROGRAMROOT%/jre
if exist "%PROGRAMROOT%/mysql-5.1.29/bin//mysqld.exe" goto okMySqlHome
echo Cannot find %PROGRAMROOT%/mysql-5.1.29
echo The DataBase is needed to run this program
goto end
:okMySqlHome
set MYSQLHOME=%PROGRAMROOT%/mysql-5.1.29
if exist "%PROGRAMROOT%/Tomcat 5.5/bin/startup.bat" goto okTomcatHome
echo Cannot find %PROGRAMROOT%/Tomcat 5.5
echo This server is needed to run this program
goto end
:okTomcatHome
set TOMCATHOME=%PROGRAMROOT%/Tomcat 5.5
if exist "%MYSQLHOME%" goto okStartMySql
echo Cannot find %MYSQLHOME%
echo The DataBase is needed to run this program
goto end
:okStartMySql
start %MYSQLHOME%/bin/mysqld.exe --console
if exist "%TOMCATHOME%" goto okStartTomcat
echo Cannot find %TOMCATHOME%
echo This server is needed to run this program
goto end
:okStartTomcat
cd %TOMCATHOME%/bin
rem Get remaining unshifted command line arguments and save them in the
set CMD_LINE_ARGS=
:setArgs
if ""%1""=="""" goto doneSetArgs
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto setArgs
:doneSetArgs
call "%TOMCATHOME%/bin/startup.bat" start %CMD_LINE_ARGS%
:end
配置零时环境变量
最新推荐文章于 2023-01-30 09:44:11 发布