Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1405] Print warning message instead of failing the bootstrap when using Java prior 8u151 #1406

Merged
merged 5 commits into from
Jan 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions bin/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
Loading