From 0d96a27ea46914b58b194d7aadf2f7c402157526 Mon Sep 17 00:00:00 2001 From: juerg Date: Mon, 15 Jan 2024 23:12:12 +0100 Subject: [PATCH] refactoring --- src/main/resources/com/github/jlangch/venice/venice.bat | 8 +++++++- src/main/resources/com/github/jlangch/venice/venice.sh | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/main/resources/com/github/jlangch/venice/venice.bat b/src/main/resources/com/github/jlangch/venice/venice.bat index c2729261f..b8ec6b101 100644 --- a/src/main/resources/com/github/jlangch/venice/venice.bat +++ b/src/main/resources/com/github/jlangch/venice/venice.bat @@ -30,10 +30,16 @@ if not exist %VENICE_CONSOLE_HOME%\libs ( exit 2 ) +if not exist %JAVA_8_HOME%\libs ( + echo Error: The Java 8 home dir %JAVA_8_HOME% does not exist! + timeout /t 10 + exit 2 +) + cd %VENICE_CONSOLE_HOME% -"%JAVA_17_HOME%\bin\java.exe" ^ +"%JAVA_8_HOME%\bin\java.exe" ^ -server ^ -Xmx2G ^ -XX:-OmitStackTraceInFastThrow ^ diff --git a/src/main/resources/com/github/jlangch/venice/venice.sh b/src/main/resources/com/github/jlangch/venice/venice.sh index d4f3b441b..fa6e7692c 100644 --- a/src/main/resources/com/github/jlangch/venice/venice.sh +++ b/src/main/resources/com/github/jlangch/venice/venice.sh @@ -31,11 +31,18 @@ if [ ! -d ${VENICE_CONSOLE_HOME}/libs ]; then exit 1 fi +if [ ! -d ${JAVA_8_HOME} ]; then + echo + echo "Error: The Java 8 home dir ${JAVA_8_HOME} does not exist!" + sleep 5 + exit 1 +fi + cd ${VENICE_CONSOLE_HOME} -${JAVA_11_HOME}/bin/java \ +${JAVA_8_HOME}/bin/java \ -server \ -cp "lib:libs/*" com.github.jlangch.venice.Launcher \ -Xmx2G \