Rollforward of https://github.com/bazelbuild/bazel/commit/37eb1d79ecb019220073b62321f9eb88aebaa4e4: Attach Java runtime to Java toolchains

Defining a new rule "java_runtime_version_alias", which uses a custom configuration flag transition to select a specific version of...

NEW: ...

Automated rollback of commit ddfc932380c8147c70bb3faf1bc999f0cc3652f2.

*** Reason for rollback ***

Rollforward

*** Original change description ***

Automated rollback of commit 37eb1d79ecb019220073b62321f9eb88aebaa4e4.

*** Reason for rollback ***

Breaks multiple downstream projects, see https://buildkite.com/bazel/bazel-auto-sheriff-face-with-cowboy-hat/builds/364#c671c11c-f885-4527-829f-057b0e29d29c

PiperOrigin-RevId: 347364659
diff --git a/scripts/bootstrap/bootstrap.sh b/scripts/bootstrap/bootstrap.sh
index a42c861..597379b 100755
--- a/scripts/bootstrap/bootstrap.sh
+++ b/scripts/bootstrap/bootstrap.sh
@@ -36,12 +36,15 @@
       --strategy=Javac=worker --worker_quit_after_build --ignore_unsupported_sandboxing \
       --compilation_mode=opt \
       --distdir=derived/distdir \
-      --java_toolchain=//src/java_tools/buildjar:bootstrap_toolchain \
-      --host_java_toolchain=//src/java_tools/buildjar:bootstrap_toolchain \
-      --extra_toolchains=//src/java_tools/buildjar:bootstrap_toolchain_definition \
+      --java_toolchain=//scripts/bootstrap:bootstrap_toolchain \
+      --host_java_toolchain=//scripts/bootstrap:bootstrap_toolchain \
+      --incompatible_use_toolchain_resolution_for_java_rules \
+      --extra_toolchains=//scripts/bootstrap:bootstrap_toolchain_definition \
       ${DIST_BOOTSTRAP_ARGS:-} \
       ${EXTRA_BAZEL_ARGS:-}"
 
+cp scripts/bootstrap/BUILD.bootstrap scripts/bootstrap/BUILD
+
 if [ -z "${BAZEL-}" ]; then
   function _run_bootstrapping_bazel() {
     local command=$1