Skip to content

Commit

Permalink
Remove redundant -XX:+UseG1GC JVM option
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
wborn committed Aug 9, 2023
1 parent bb0bad4 commit 1ea86ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
9 changes: 1 addition & 8 deletions distributions/openhab/src/main/resources/bin/setenv
Original file line number Diff line number Diff line change
Expand Up @@ -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"


Expand Down
3 changes: 1 addition & 2 deletions distributions/openhab/src/main/resources/bin/setenv.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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%

Expand Down

0 comments on commit 1ea86ba

Please sign in to comment.