From f8b5f82b1ee51cd112550b761789488ec53ce080 Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Sat, 12 Aug 2023 16:25:01 +0200 Subject: [PATCH] Remove redundant `-XX:+UseG1GC` JVM option (#1567) The G1 garbage collector is the default GC since Java 9, see: https://www.oracle.com/java/technologies/javase/9-relnotes.html#JDK-8081607 Signed-off-by: Wouter Born --- distributions/openhab/src/main/resources/bin/setenv | 9 +-------- distributions/openhab/src/main/resources/bin/setenv.bat | 3 +-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/distributions/openhab/src/main/resources/bin/setenv b/distributions/openhab/src/main/resources/bin/setenv index 65ae7ef24d..c2290092fe 100755 --- a/distributions/openhab/src/main/resources/bin/setenv +++ b/distributions/openhab/src/main/resources/bin/setenv @@ -114,17 +114,10 @@ export JAVA_OPTS="${JAVA_OPTS} # # set JVM options # -ARCH=`uname -m` EXTRA_JAVA_OPTS_COMMON=" -Djava.awt.headless=true -Dfile.encoding=UTF-8" -EXTRA_JAVA_OPTS_ARCH="" -case "$ARCH" in - *arm*) ;; - *aarch*) ;; - *) EXTRA_JAVA_OPTS_ARCH="-XX:+UseG1GC" ;; -esac -export EXTRA_JAVA_OPTS="${EXTRA_JAVA_OPTS_COMMON} ${EXTRA_JAVA_OPTS_ARCH} ${EXTRA_JAVA_OPTS}" +export EXTRA_JAVA_OPTS="${EXTRA_JAVA_OPTS_COMMON} ${EXTRA_JAVA_OPTS}" export JAVA_NON_DEBUG_OPTS="-XX:-UsePerfData" diff --git a/distributions/openhab/src/main/resources/bin/setenv.bat b/distributions/openhab/src/main/resources/bin/setenv.bat index 1e344905ca..e8ff71d14a 100644 --- a/distributions/openhab/src/main/resources/bin/setenv.bat +++ b/distributions/openhab/src/main/resources/bin/setenv.bat @@ -129,8 +129,7 @@ set JAVA_OPTS=%JAVA_OPTS% ^ -Dorg.osgi.service.http.port.secure=%HTTPS_PORT% :: set jvm options -set EXTRA_JAVA_OPTS=-XX:+UseG1GC ^ - -Djava.awt.headless=true ^ +set EXTRA_JAVA_OPTS=-Djava.awt.headless=true ^ -Dfile.encoding=UTF-8 ^ %EXTRA_JAVA_OPTS%