Skip to content

Commit

Permalink
Add Java 11 to allowed versions
Browse files Browse the repository at this point in the history
pr-link: Alluxio#11865
change-id: cid-3ab9cd452094d5566f72d61ca95bc4d02eea1e22
  • Loading branch information
yuzhu authored Jul 31, 2020
1 parent 7179e01 commit 788d2f9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions libexec/alluxio-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ if [[ -z "${JAVA}" ]]; then
fi
fi

# Check Java version == 1.8
# Check Java version == 1.8 or == 11
JAVA_VERSION=$(${JAVA} -version 2>&1 | awk -F '"' '/version/ {print $2}')
if [[ $(echo "${JAVA_VERSION}" | awk -F. '{printf("%03d%03d",$1,$2);}') != 001008 ]]; then
echo "Error: Alluxio requires Java 8, currently Java $JAVA_VERSION found."
JAVA_MAJORMINOR=$(echo "${JAVA_VERSION}" | awk -F. '{printf("%03d%03d",$1,$2);}')
JAVA_MAJOR=$(echo "${JAVA_VERSION}" | awk -F. '{printf("%03d",$1);}')
if [[ ${JAVA_MAJORMINOR} != 001008 && ${JAVA_MAJOR} != 011 ]]; then
echo "Error: Alluxio requires Java 8 or Java 11, currently Java $JAVA_VERSION found."
exit 1
fi

Expand Down

0 comments on commit 788d2f9

Please sign in to comment.