From af0e0a110e7187bf008655f7510199a0c0b25ec4 Mon Sep 17 00:00:00 2001
From: Nymph2333 <498092988@qq.com>
Date: 星期一, 10 四月 2023 14:27:40 +0800
Subject: [PATCH] newInstance() 已弃用,使用clazz.getDeclaredConstructor().newInstance() This method propagates any exception thrown by the nullary constructor, including a checked exception. Use of this method effectively bypasses the compile-time exception checking that would otherwise be performed by the compiler. The Constructor.newInstance method avoids this problem by wrapping any exception thrown by the constructor in a (checked) InvocationTargetException. The call  clazz.newInstance() can be replaced by  clazz.getDeclaredConstructor().newInstance() The latter sequence of calls is inferred to be able to throw the additional exception types InvocationTargetException and NoSuchMethodException. Both of these exception types are subclasses of ReflectiveOperationException.

---
 ry.bat |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/ry.bat b/ry.bat
index 5de3e15..69abee7 100644
--- a/ry.bat
+++ b/ry.bat
@@ -4,36 +4,36 @@
 set AppName=ruoyi-admin.jar
 
 rem JVM����
-set JVM_OPTS="-Dname=%AppName%  -Duser.timezone=Asia/Shanghai -Xms512M -Xmx512M -XX:PermSize=256M -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps  -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC"
+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.
 	ECHO.  [1] ����%AppName%
 	ECHO.  [2] �ر�%AppName%
 	ECHO.  [3] ����%AppName%
 	ECHO.  [4] ����״̬ %AppName%
-	ECHO.  [5] �� �� 
-ECHO. 
+	ECHO.  [5] �� ��
+ECHO.
 
 ECHO.������ѡ����Ŀ�����:
 set /p ID=
-	IF "%id%"=="1" GOTO start 
-	IF "%id%"=="2" GOTO stop 
-	IF "%id%"=="3" GOTO restart 
+	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 
+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 
-	) 
+		echo %%is running
+		PAUSE
+	)
 
-start javaw -jar %JAVA_OPTS% ruoyi-admin.jar
+start javaw %JVM_OPTS% -jar %AppName%
 
 echo  starting����
 echo  Start %AppName% success...
@@ -64,4 +64,4 @@
 	if not defined pid (echo process %AppName% is dead ) else (
 		echo %image_name% is running
 	)
-goto:eof
\ No newline at end of file
+goto:eof

--
Gitblit v1.9.2