Support newer jdk version when Compiling Bazel from Source without an existing Bazel binary
fix #18961
Closes #19125.
PiperOrigin-RevId: 553738828
Change-Id: Ic4504ef8f28cc264fcf80c898123ffb6ce5bd854
diff --git a/scripts/bootstrap/compile.sh b/scripts/bootstrap/compile.sh
index 55d7174..91dea6f 100755
--- a/scripts/bootstrap/compile.sh
+++ b/scripts/bootstrap/compile.sh
@@ -450,6 +450,7 @@
-XX:+HeapDumpOnOutOfMemoryError -Xverify:none -Dfile.encoding=ISO-8859-1 \
-XX:HeapDumpPath=${OUTPUT_DIR} \
-Djava.util.logging.config.file=${OUTPUT_DIR}/javalog.properties \
+ --add-opens java.base/java.lang=ALL-UNNAMED \
${JNI_FLAGS} \
-jar ${ARCHIVE_DIR}/libblaze.jar \
--batch \