From c6a8462ecea9af17e3e01aacd888492a35ecf30b Mon Sep 17 00:00:00 2001 From: heavyrian2012 Date: Thu, 13 Apr 2023 09:30:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=AF=E5=8A=A8=E6=B3=A8?= =?UTF-8?q?=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- distribution/src/main/scripts/wildfirechat.bat | 4 ++++ distribution/src/main/scripts/wildfirechat.sh | 2 ++ 2 files changed, 6 insertions(+) diff --git a/distribution/src/main/scripts/wildfirechat.bat b/distribution/src/main/scripts/wildfirechat.bat index 972464b3..e60e4ec3 100644 --- a/distribution/src/main/scripts/wildfirechat.bat +++ b/distribution/src/main/scripts/wildfirechat.bat @@ -72,6 +72,10 @@ rem set JAVA_OPTS=%JAVA_OPTS% -XX:+UseGCLogFileRotation rem set JAVA_OPTS=%JAVA_OPTS% -XX:NumberOfGCLogFiles=10 rem set JAVA_OPTS=%JAVA_OPTS% -XX:GCLogFileSize=10M" +rem 如果JDK版本是9及以上,请打开这个配置 +rem set JAVA_OPTS=%JAVA_OPTS% --add-modules java.se --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED + + echo echo "Please set Xmx and Xms parameters!" echo "Please set Xmx and Xms parameters!" diff --git a/distribution/src/main/scripts/wildfirechat.sh b/distribution/src/main/scripts/wildfirechat.sh index fc40594c..d8deeec8 100755 --- a/distribution/src/main/scripts/wildfirechat.sh +++ b/distribution/src/main/scripts/wildfirechat.sh @@ -86,6 +86,8 @@ JAVA_OPTS="$JAVA_OPTS -XX:MaxGCPauseMillis=500" #JAVA_OPTS="$JAVA_OPTS -XX:NumberOfGCLogFiles=10" #JAVA_OPTS="$JAVA_OPTS -XX:GCLogFileSize=10M" +#如果JDK版本是9及以上,请打开这个配置 +#JAVA_OPTS="$JAVA_OPTS --add-modules java.se --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED" echo "警告:没有设置JVM内存参数!" echo "请设置JVM参数Xmx和Xms,设置为您为IM服务预留的内存大小,注意需要刨除操作系统占用,如果有其它系统也需要相应去除占用。"