2021-11-01 Tomcat 启动批处理

进程检查

@echo off


DATE /T >>log.txt && TIME /T  >>log.txt
echo Start 开始 >>log.txt

call %CATALINA_HOME%\bin\shutdown.bat

call start-tomcat.bat


DATE /T >>log.txt && TIME /T >>log.txt
echo End 结束 >>log.txt

echo off
set TITLE=Dccks8080 
set "CURRENT_DIR=%cd%"
set "CATALINA_BASE=%CURRENT_DIR%\apache-tomcat-8.5.34"
set "CATALINA_HOME=%CURRENT_DIR%\apache-tomcat-8.5.34"
set "JAVA_HOME=%CURRENT_DIR%\Java\jdk1.7.0_80"
set "JRE_HOME=%CURRENT_DIR%\Java\jdk1.7.0_80\jre"
set "CLASSPATH=%JRE_HOME%\lib"
set "PATH=%PATH%;%JRE_HOME%\bin"
call %CATALINA_HOME%\bin\startup.bat 
#pause
@echo off
set TITLE=TOMCAT9
set "CURRENT_DIR=%cd%"
set "CATALINA_BASE=%CURRENT_DIR%\apache-tomcat-9.0.75"
set "CATALINA_HOME=%CURRENT_DIR%\apache-tomcat-9.0.75"
set "JAVA_HOME=%CURRENT_DIR%\Java\jre1.8.0_241"
rem set "JRE_HOME=%CURRENT_DIR%\Java\jdk-17.0.7\jre"
set "CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib"
set "PATH=%PATH%;%JAVA_HOME%\bin"
set "CURL_PATH=D:\Program Files (x86)\curl-7.61.1-win64-mingw\bin"
set "PATH=%PATH%;%CURL_PATH%"
call %CATALINA_HOME%\bin\startup.bat 

TIMEOUT /T 45 /NOBREAK

@echo:
echo 等待启动第二个项目
echo "start?path=/dms"

curl -u admin:123456 http://localhost:8080/manager/text/start?path=/dms

pause

 

VBE文件

Set shell = Wscript.CreateObject("WScript.Shell")

a = shell.run ("C:\\apache-tomcat\\start-tomcat.bat",0)

@echo off

DATE /T >>log.txt && TIME /T >>log.txt

echo -------------------------------- >>log.txt

del /f /s /q xxx\*.*>>log.txt

echo -------------------------------- >>log.txt

DATE /T >>log.txt && TIME /T >>log.txt

你可能感兴趣的:(java,tomcat,java,开发语言)