From df7b0fac4e34b3c69e9fc88f1f6748bf5cb70091 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Wed, 10 Jul 2024 12:41:53 +0200 Subject: [PATCH] Add binary check --- entrypoint.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 1e17540..0c3472a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -141,7 +141,12 @@ function compile_args() { function compile_flags() { echo ":: Compiling java flags" if [ "${MCSD_JAVA_CUSTOM}" == "true" ]; then - export "JAVA_HOME=/jvm" + if [ -f "/jvm/bin/java" ]; then + export "JAVA_HOME=/jvm" + else + echo ":: Error: /jvm/bin/java not found, using built-in JVM" + export "JAVA_HOME=/usr/lib/jvm/java-${MCSD_JAVA_VERSION}-openjdk" + fi else export "JAVA_HOME=/usr/lib/jvm/java-${MCSD_JAVA_VERSION}-openjdk" fi