Skip to content

Commit

Permalink
Get rid of JDK8 in scripts, not supported anywhere anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
ekaterinadimitrova2 committed Nov 6, 2024
1 parent 94257c0 commit 42378b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
-->
<property name="java.default" value="11" />
<!-- Not sure whether we need 17 below, at least jvm options were added some time ago for 17 -->
<property name="java.supported" value="1.8,11,17,22" />
<property name="java.supported" value="11,17,22" />

<!-- directory details -->
<property name="basedir" value="."/>
Expand Down
17 changes: 2 additions & 15 deletions tools/bin/cassandra.in.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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
Expand Down

0 comments on commit 42378b4

Please sign in to comment.