@echo off
rem if "%OS%" == "Windows_NT" setlocal
if "%JAVA_HOME%" == "" goto noJavaHome
set "JAVA_HOME=%JAVA_HOME%"
set JAVA="%JAVA_HOME%/bin/java"
set BASE_DIR=%~dp0..
set CLASSPATH="%CLASSPATH%;%BASE_DIR%/conf;"
set JAVA_OPT=%JAVA_OPT% -server -XX:PermSize=128m -XX:MaxPermSize=320m
set JAVA_OPT=%JAVA_OPT% -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSClassUnloadingEnabled -XX:SurvivorRatio=8 -XX:+DisableExplicitGC
set JAVA_OPT=%JAVA_OPT% -verbose:gc -Xloggc:%ROCKETMQ_HOME%/rmq_srv_gc.log -XX:+PrintGCDetails
set JAVA_OPT=%JAVA_OPT% -XX:-OmitStackTraceInFastThrow
set JAVA_OPT=%JAVA_OPT% -Djava.ext.dirs=%BASE_DIR%/lib
set JAVA_OPT=%JAVA_OPT% -cp %CLASSPATH%
%java% %JAVA_OPT% com.alibaba.rocketmq.namesrv.NamesrvStartup
rem java -Djava.ext.dirs="%BASE_DIR%\lib" -cp "%CLASSPATH%" com.alibaba.rocketmq.namesrv.NamesrvStartup
:noJavaHome
echo 请设置JAVA_HOME环境变量,我们需要64位的JDK!
goto exit
:exit
exit /b 1
:end
exit /b 0
RocketMQ中的批处理
最新推荐文章于 2024-05-30 14:44:45 发布