Remove support for --javabase=<absolute path>.
If an absolute javabase is desired, the following set of rules can be used:
java_runtime_suite(name="suite", default=":runtime")
java_runtime(name="runtime", java_home=<path to the JDK>)
Then --javabase can be pointed to the java_runtime_suite() rule.
Alternatively, the java_runtime rule can reference a Make variable:
java_runtime(name="runtime", java_home="$(ABSOLUTE_JAVABASE)")
Then the Javabase can be specified on the command line like this:
--javabase=<your package>:suite --define=ABSOLUTE_JAVABASE=<path to the JDK>
RELNOTES[INC]: --javabase=<absolute path> and --host_javabase=<absolute path>
are not supported anymore. If you need this functionality java_runtime_suite(name="suite", default=":runtime") java_runtime(name="runtime", java_home=<path to the JDK>) is an alternative.
PiperOrigin-RevId: 171798416
diff --git a/src/test/shell/integration/java_integration_test.sh b/src/test/shell/integration/java_integration_test.sh
index 82e0bb3..984eca7 100755
--- a/src/test/shell/integration/java_integration_test.sh
+++ b/src/test/shell/integration/java_integration_test.sh
@@ -251,9 +251,17 @@
local -r javabase="${BAZEL_RUNFILES}/${runfiles_relative_javabase}"
fi
+ mkdir -p "$pkg/jvm"
+ cat > "$pkg/jvm/BUILD" <<EOF
+package(default_visibility=["//visibility:public"])
+java_runtime_suite(name='suite', default=':runtime')
+java_runtime(name='runtime', java_home='$javabase')
+EOF
+
+
# Set javabase to an absolute path.
bazel build //$pkg/java/hello:hello //$pkg/java/hello:hello_deploy.jar \
- "$stamp_arg" --javabase="$javabase" "$embed_label" >&"$TEST_log" \
+ "$stamp_arg" --javabase="//$pkg/jvm:suite" "$embed_label" >&"$TEST_log" \
|| fail "Build failed"
mkdir $pkg/ugly/ || fail "mkdir failed"