From d455444c66f4eb1ef341f58a98c6bbe34626d898 Mon Sep 17 00:00:00 2001 From: "sigonasr2, Sig, Sigo" Date: Tue, 14 Jun 2022 17:21:26 +0000 Subject: [PATCH] Add java optimal GC options Co-authored-by: sigonasr2 --- Java/scripts/build.sh | 10 +++++++++- Java/scripts/build2.sh | 10 +++++++++- Java/scripts/md5 | 4 ++-- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Java/scripts/build.sh b/Java/scripts/build.sh index e176940..332aac7 100755 --- a/Java/scripts/build.sh +++ b/Java/scripts/build.sh @@ -5,5 +5,13 @@ javac -source ${SOURCE_VERSION} -target ${TARGET_VERSION} -Xlint:unchecked -cp $ printf "\n\n\nRunning Program...\n\n" ORIGINAL_LOC=$(pwd) cd $OUT_DIR -java ${CUSTOM_PARAMS} -cp .:../lib/bin/ -Djava.library.path="${LIBRARY_PATH}" ${MAIN_CLASS} "$@" +if java ${CUSTOM_PARAMS} -cp .:../lib/bin/ -XX:+UseZGC -Djava.library.path="${LIBRARY_PATH}" ${MAIN_CLASS} "$@"; then + ${ORIGINAL_LOC}/${LANGUAGE}/scripts/clean.sh + return +fi +if java ${CUSTOM_PARAMS} -cp .:../lib/bin/ -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -Djava.library.path="${LIBRARY_PATH}" ${MAIN_CLASS} "$@"; then + ${ORIGINAL_LOC}/${LANGUAGE}/scripts/clean.sh + return +fi +java ${CUSTOM_PARAMS} -cp .:../lib/bin/ -XX:+PrintCommandLineFlags -Djava.library.path="${LIBRARY_PATH}" ${MAIN_CLASS} "$@" ${ORIGINAL_LOC}/${LANGUAGE}/scripts/clean.sh \ No newline at end of file diff --git a/Java/scripts/build2.sh b/Java/scripts/build2.sh index bbcced0..59f636f 100644 --- a/Java/scripts/build2.sh +++ b/Java/scripts/build2.sh @@ -5,5 +5,13 @@ javac -source ${SOURCE_VERSION} -target ${TARGET_VERSION} -Xlint:unchecked -cp $ printf "\n\n\nRunning Program...\n\n" ORIGINAL_LOC=$(pwd) cd $OUT_DIR -java ${CUSTOM_PARAMS} -cp ".;../lib/bin/ " "-Djava.library.path=${LIBRARY_PATH}" ${MAIN_CLASS} "$@" +if java ${CUSTOM_PARAMS} -cp ".;../lib/bin/" -XX:+UseZGC "-Djava.library.path=${LIBRARY_PATH}" ${MAIN_CLASS} "$@"; then + ${ORIGINAL_LOC}/${LANGUAGE}/scripts/clean.sh + return +fi +if java ${CUSTOM_PARAMS} -cp ".;../lib/bin/" -XX:+UnlockExperimentalVMOptions -XX:+UseZGC "-Djava.library.path=${LIBRARY_PATH}" ${MAIN_CLASS} "$@"; then + ${ORIGINAL_LOC}/${LANGUAGE}/scripts/clean.sh + return +fi +java ${CUSTOM_PARAMS} -cp ".;../lib/bin/" -XX:+PrintCommandLineFlags "-Djava.library.path=${LIBRARY_PATH}" ${MAIN_CLASS} "$@" ${ORIGINAL_LOC}/${LANGUAGE}/scripts/clean.sh \ No newline at end of file diff --git a/Java/scripts/md5 b/Java/scripts/md5 index 5aca4fd..c341252 100644 --- a/Java/scripts/md5 +++ b/Java/scripts/md5 @@ -1,5 +1,5 @@ -build2.sh:8e21e7c419a3c3974ab32902802a8c7a - -build.sh:b247061c83c39b1bb78ac7642534ba2c - +build2.sh:cf159b0f2193ff280c455a7547126073 - +build.sh:5a48a79ccbb92272c26bc461833586dd - clean.sh:668a2f9b568c55f6a044a509315032f6 - commit.sh:5e4448db9ad48e72ec3a1ff4f5763b41 - jar2.sh:7977fc138ee5db798d08c34734f0be93 -