1 Star 7 Fork 3

geogerytony/Youth-RuoShui-BigData

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ry.bat 1.68 KB
一键复制 编辑 原始数据 按行查看 历史
geogerytony 提交于 2024-10-14 16:08 . 初始化
@echo off
rem jarƽ��Ŀ¼
set AppName=ruoshui-admin/target/ruoshui-admin.jar
rem set AppName=ruoshui-admin.jar
rem JVM����
set JVM_OPTS="-Dname=%AppName% -Duser.timezone=Asia/Shanghai -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC"
ECHO.
ECHO. [1] start %AppName%
ECHO. [2] stop %AppName%
ECHO. [3] restart %AppName%
ECHO. [4] status %AppName%
ECHO. [5] exit
ECHO.
ECHO. enter type to choose :
set /p ID=
IF "%id%"=="1" GOTO start
IF "%id%"=="2" GOTO stop
IF "%id%"=="3" GOTO restart
IF "%id%"=="4" GOTO status
IF "%id%"=="5" EXIT
PAUSE
:start
for /f "usebackq tokens=1-2" %%a in (`jps -l ^| findstr %AppName%`) do (
set pid=%%a
set image_name=%%b
)
if defined pid (
echo %%is running
PAUSE
)
start javaw %JVM_OPTS% -jar %AppName%
echo starting����
echo Start %AppName% success...
goto:eof
rem ����stopͨ��jps�������pid����������
:stop
for /f "usebackq tokens=1-2" %%a in (`jps -l ^| findstr %AppName%`) do (
set pid=%%a
set image_name=%%b
)
if not defined pid (echo process %AppName% does not exists) else (
echo prepare to kill %image_name%
echo start kill %pid% ...
rem ���ݽ���ID��kill����
taskkill /f /pid %pid%
)
goto:eof
:restart
call :stop
call :start
goto:eof
:status
for /f "usebackq tokens=1-2" %%a in (`jps -l ^| findstr %AppName%`) do (
set pid=%%a
set image_name=%%b
)
if not defined pid (echo process %AppName% is dead ) else (
echo %image_name% is running
)
goto:eof
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/419338200/youth-RuoShui-BigData.git
[email protected]:419338200/youth-RuoShui-BigData.git
419338200
youth-RuoShui-BigData
Youth-RuoShui-BigData
master

搜索帮助