Skip to content

Commit

Permalink
Fix tools/bin/cassandra.in.sh; fix some JDK internals openings for au…
Browse files Browse the repository at this point in the history
…dit logger and vectorizedMismatch
  • Loading branch information
ekaterinadimitrova2 committed Nov 1, 2024
1 parent 641f27d commit 286bf05
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@
<string>--add-exports jdk.naming.dns/com.sun.jndi.dns=java.naming</string>
<string>--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</string>
<string>--add-exports jdk.unsupported/sun.misc=ALL-UNNAMED</string>
<string>--add-exports java.base/jdk.internal.util.jar=ALL-UNNAMED</string>

<string>--add-opens java.base/jdk.internal.module=ALL-UNNAMED</string>
<string>--add-opens java.base/jdk.internal.reflect=ALL-UNNAMED</string>
Expand Down
1 change: 1 addition & 0 deletions conf/jvm22-server.options
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
--add-exports jdk.naming.dns/com.sun.jndi.dns=java.naming
--add-exports jdk.unsupported/sun.misc=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
--add-exports java.base/jdk.internal.util.jar=ALL-UNNAMED

--add-opens java.base/jdk.internal.loader=ALL-UNNAMED
--add-opens java.base/jdk.internal.ref=ALL-UNNAMED
Expand Down
10 changes: 9 additions & 1 deletion tools/bin/cassandra.in.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,16 @@ 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`
JVM_VERSION=${jvmver%_*}
short=$(echo "${jvmver}" | cut -c1-2)

JAVA_VERSION=22

JAVA_VERSION=11
if [ "$JVM_VERSION" = "1.8.0" ] ; then
JVM_PATCH_VERSION=${jvmver#*_}
if [ "$JVM_VERSION" \< "1.8" ] || [ "$JVM_VERSION" \> "1.8.2" ] ; then
Expand All @@ -96,6 +100,10 @@ if [ "$JVM_VERSION" = "1.8.0" ] ; then
elif [ "$JVM_VERSION" \< "11" ] ; then
echo "Cassandra 4.0 requires either Java 8 (update 151 or newer) or Java 11 (or newer)."
exit 1;
elif [ "$short" = "11" ] ; then
JAVA_VERSION=11
elif [ "$JVM_VERSION" \< "22" ] ; then
echo "Cassandra requires Java 11 or Java 22(or newer)."
fi

jvm=`echo "$java_ver_output" | grep -A 1 '[openjdk|java] version' | awk 'NR==2 {print $1}'`
Expand Down

0 comments on commit 286bf05

Please sign in to comment.