World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#1405] Print warning message instead of failing the bootstrap when using Java prior 8u151 (#1406)
Cheng Panc62aa875edd5
diff --git a/bin/common.sh b/bin/common.shindex 6f9f37eb7c..7aa3681afa 100644--- a/bin/common.sh+++ b/bin/common.sh@@ -56,11 +56,15 @@ function check_java_version() {JVM_VERSION=$(echo "$jvmver"|sed -e 's|^1\.\([0-9][0-9]*\)\..*$|\1|')fi+ if [ "$JVM_VERSION" -lt 8 ]; then+ echo "Gravitino requires either Java 8 or newer"+ exit 1+ fi+# JDK 8u151 version fixed a number of security vulnerabilities and issues to improve system stability and security.# https://www.oracle.com/java/technologies/javase/8u151-relnotes.html- if [ "$JVM_VERSION" -lt 8 ] || { [ "$JVM_VERSION" -eq 8 ] && [ "${jvmver#*_}" -lt 151 ]; } ; then- echo "Gravitino requires either Java 8 update 151 or newer"- exit 1;+ if [[ "$JVM_VERSION" -eq 8 && "${jvmver#*_}" -lt 151 ]]; then+ echo "[WARNING] Gravitino highly recommends using either Java 8 update 151 or newer"fi}