Skip to content

Commit

Permalink
HBASE-28252 Add sun.net.dns and sun.net.util to the JDK11+ module exp…
Browse files Browse the repository at this point in the history
…orts in the hbase script (#5571)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Balazs Meszaros <meszibalu@apache.org>
(cherry picked from commit 5503962)
  • Loading branch information
stoty authored and petersomogyi committed Jan 9, 2024
1 parent f7d4e20 commit 397ba45
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bin/hbase-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,12 @@ EOF
fi

function read_java_version() {
properties="$("${JAVA_HOME}/bin/java" -XshowSettings:properties -version 2>&1)"
echo "${properties}" | "${GREP}" java.runtime.version | head -1 | "${SED}" -e 's/.* = \([^ ]*\)/\1/'
# Avoid calling java repeatedly
if [ -z "$read_java_version_cached" ]; then
properties="$("${JAVA_HOME}/bin/java" -XshowSettings:properties -version 2>&1)"
read_java_version_cached="$(echo "${properties}" | "${GREP}" java.runtime.version | head -1 | "${SED}" -e 's/.* = \([^ ]*\)/\1/')"
fi
echo "$read_java_version_cached"
}

# Inspect the system properties exposed by this JVM to identify the major
Expand Down

0 comments on commit 397ba45

Please sign in to comment.