From d00cf5ac414f97c5966b15e029107c95a11695ac Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Wed, 9 Aug 2023 08:56:22 +0200 Subject: [PATCH] Remove redundant `-XX:+UseG1GC` JVM option 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 | 8 +------- distributions/openhab/src/main/resources/bin/setenv.bat | 3 +-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/distributions/openhab/src/main/resources/bin/setenv b/distributions/openhab/src/main/resources/bin/setenv index 65ae7ef24d..d0eaac46b2 100755 --- a/distributions/openhab/src/main/resources/bin/setenv +++ b/distributions/openhab/src/main/resources/bin/setenv @@ -118,13 +118,7 @@ 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%