Skip to content

Commit

Permalink
HBASE-25058 Export necessary modules when running under JDK11 (apache…
Browse files Browse the repository at this point in the history
…#4337)

Singed-off-by: Nick Dimiduk <[email protected]>
(cherry picked from commit 82e47cd)
  • Loading branch information
Apache9 authored and stoty committed Dec 12, 2023
1 parent a253472 commit 83fbb7e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions bin/hbase
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,10 @@ add_jdk11_deps_to_classpath() {
done
}

add_jdk11_jvm_flags() {
HBASE_OPTS="$HBASE_OPTS -Dio.netty.tryReflectionSetAccessible=true --illegal-access=permit --add-modules jdk.unsupported --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-exports java.base/jdk.internal.misc=ALL-UNNAMED"
}

#Add the development env class path stuff
if $in_dev_env; then
add_maven_deps_to_classpath "cached_classpath.txt"
Expand Down Expand Up @@ -754,11 +758,14 @@ fi

if [ "${addJDK11Jars}" = "true" ]; then
add_jdk11_deps_to_classpath
add_jdk11_jvm_flags
if [ "${DEBUG}" = "true" ]; then
echo "Added JDK11 jars to classpath."
fi
echo "Added JDK11 jars to classpath."
echo "Added JDK11 JVM flags too."
fi
elif [ "${DEBUG}" = "true" ]; then
echo "JDK11 jars skipped from classpath."
echo "Skipped adding JDK11 JVM flags."
fi

# Have JVM dump heap if we run out of memory. Files will be 'launch directory'
Expand Down

0 comments on commit 83fbb7e

Please sign in to comment.