From 3465b8253ecc4e3d1a2d883c262b481415956c4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E5=AD=90=E6=9D=8E=C2=B7De?= Date: Sat, 24 Jul 2021 13:39:37 +0800 Subject: [PATCH] Update start.bat --- report-core/src/main/assembly/bin/start.bat | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/report-core/src/main/assembly/bin/start.bat b/report-core/src/main/assembly/bin/start.bat index c0c167c6..f5e66a2d 100755 --- a/report-core/src/main/assembly/bin/start.bat +++ b/report-core/src/main/assembly/bin/start.bat @@ -8,7 +8,6 @@ IF "%JAVA_HOME%" == "" ( goto START ) - :END rem cmd中未找到JAVA_HOME,请在此启动文件中第4行指定,然后尝试 echo Not JAVA_HOME Find, Please add JAVA_HOME in this file line 4 @@ -19,26 +18,25 @@ IF "%JAVA_HOME%" == "" ( rem 获取应用的根目录 cd ../ set BIN_DIR=%cd% + set CONF_YML=%BIN_DIR%\conf\bootstrap.yml - set CONF_YML=%BIN_DIR%/conf/bootstrap.yml - - cd %BIN_DIR%/lib - + cd %BIN_DIR%\lib rem 查找aj-report*.jar启动文件,版本号每次会变 for /f "delims=" %%i in ('dir /a-d /b /on aj-report*.jar') do ( set BOOT_JAR=%%i ) rem 查找附加的驱动,加到java启动的classpath中 - for %%i in (*) do ( + for %%i in ("%BIN_DIR%\lib\*") do ( if "%%i" neq "%BOOT_JAR%" ( - set LIB_JARS=!LIB_JARS!%BIN_DIR%/lib/%%i; + set LIB_JARS=!LIB_JARS!%BIN_DIR%\lib\%%i; ) ) rem 启动内存设置,请根据自己需要调整 - cd %BIN_DIR%/bin + cd %BIN_DIR%\bin set JAVA_OPTS= -server -Xms1g -Xmx2g -Xmn256m -XX:PermSize=128m -Xss256k rem 正式启动 - %JAVA_HOME%\bin\java %JAVA_OPTS% -jar -Dspring.config.location=%CONF_YML% %BIN_DIR%/lib/%BOOT_JAR% -Xbootclasspath/a:%LIB_JARS% + %JAVA_HOME%\bin\java %JAVA_OPTS% -jar -Dspring.config.location=%CONF_YML% %BIN_DIR%\lib\%BOOT_JAR% -Xbootclasspath/a:%LIB_JARS% + \ No newline at end of file