From 42378b48837edd936405513b3ff237be8d761b5b Mon Sep 17 00:00:00 2001 From: Ekaterina Dimitrova Date: Tue, 5 Nov 2024 16:33:20 -0500 Subject: [PATCH] Get rid of JDK8 in scripts, not supported anywhere anymore --- build.xml | 2 +- tools/bin/cassandra.in.sh | 17 ++--------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/build.xml b/build.xml index 8e8f13c01a32..3ab7f5f6782e 100644 --- a/build.xml +++ b/build.xml @@ -46,7 +46,7 @@ --> - + diff --git a/tools/bin/cassandra.in.sh b/tools/bin/cassandra.in.sh index 31e9728b94c6..f17730d56a41 100644 --- a/tools/bin/cassandra.in.sh +++ b/tools/bin/cassandra.in.sh @@ -76,8 +76,6 @@ if [ -z $JAVA ] ; then exit 1; fi -java_versions_supported=11,17,22 - # Determine the sort of JVM we'll be running on. java_ver_output=`"${JAVA:-java}" -version 2>&1` jvmver=`echo "$java_ver_output" | grep '[openjdk|java] version' | awk -F'"' 'NR==1 {print $2}' | cut -d\- -f1` @@ -86,19 +84,8 @@ short=$(echo "${jvmver}" | cut -c1-2) JAVA_VERSION=22 -if [ "$JVM_VERSION" = "1.8.0" ] ; then - JVM_PATCH_VERSION=${jvmver#*_} - if [ "$JVM_VERSION" \< "1.8" ] || [ "$JVM_VERSION" \> "1.8.2" ] ; then - echo "Cassandra 4.0 requires either Java 8 (update 151 or newer) or Java 11 (or newer). Java $JVM_VERSION is not supported." - exit 1; - fi - if [ "$JVM_PATCH_VERSION" -lt 151 ] ; then - echo "Cassandra 4.0 requires either Java 8 (update 151 or newer) or Java 11 (or newer). Java 8 update $JVM_PATCH_VERSION is not supported." - exit 1; - fi - JAVA_VERSION=8 -elif [ "$JVM_VERSION" \< "11" ] ; then - echo "Cassandra 4.0 requires either Java 8 (update 151 or newer) or Java 11 (or newer)." +if [ "$JVM_VERSION" \< "11" ] ; then + echo "Cassandra 4.0 requires either Java 11 or newer." exit 1; elif [ "$short" = "11" ] ; then JAVA_VERSION=11