morningman commented on code in PR #31587:
URL: https://github.com/apache/doris/pull/31587#discussion_r1510525454
##########
env.sh:
##########
@@ -213,20 +260,41 @@ if test -z "${BUILD_THIRDPARTY_WIP:-}"; then
# check java home
if [[ -z "${JAVA_HOME}" ]]; then
- JAVA="$(command -v java)"
- JAVAP="$(command -v javap)"
+ if [[ "${JDK_17}" ]]; then
+ echo "Use JDK_17"
+ JAVA="${JDK_17}/bin/java"
+ JAVAP="${JDK_17}/bin/javap"
+ export JAVA_HOME="${JDK_17}"
+ else
+ JAVA="$(command -v java)"
+ JAVAP="$(command -v javap)"
+ fi
+ check_jdk_version
else
JAVA="${JAVA_HOME}/bin/java"
JAVAP="${JAVA_HOME}/bin/javap"
+
+ echo "Check JAVA_HOME version"
+ java_version="$(
+ set -e
+ jdk_version "${JAVA}"
+ )"
+ if [[ "${java_version}" -ne 17 ]]; then
+ echo "JAVA_HOME does not point to JDK-17."
Review Comment:
print the $JAVA_HOME for easy debug
##########
env.sh:
##########
@@ -213,20 +260,41 @@ if test -z "${BUILD_THIRDPARTY_WIP:-}"; then
# check java home
if [[ -z "${JAVA_HOME}" ]]; then
- JAVA="$(command -v java)"
- JAVAP="$(command -v javap)"
+ if [[ "${JDK_17}" ]]; then
+ echo "Use JDK_17"
Review Comment:
print the $JDK_17 for easy debug
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]