Add --{no,}autodetect_server_javabase.

We want bazel to fail to start instead of falling back to a host
JRE/JDK.  We are using a hermetic JDK and the embedded JRE, so there
should be no need to use anything from the host.  We've debugged enough
cases so far where the host installed JDK was buggy and causing random
crashes on specific machines.

Fixes: #12451

Closes #12542.

PiperOrigin-RevId: 347411720
diff --git a/src/test/cpp/bazel_startup_options_test.cc b/src/test/cpp/bazel_startup_options_test.cc
index 91f1c14..742ddba 100644
--- a/src/test/cpp/bazel_startup_options_test.cc
+++ b/src/test/cpp/bazel_startup_options_test.cc
@@ -100,6 +100,7 @@
   ExpectValidNullaryOption(options, "fatal_event_bus_exceptions");
   ExpectValidNullaryOption(options, "home_rc");
   ExpectValidNullaryOption(options, "host_jvm_debug");
+  ExpectValidNullaryOption(options, "autodetect_server_javabase");
   ExpectValidNullaryOption(options, "ignore_all_rc_files");
   ExpectValidNullaryOption(options, "incompatible_enable_execution_transition");
   ExpectValidNullaryOption(options, "master_bazelrc");