Using JDK 17+, java_test rules fail if Bazel cannot determine the runtime version from the JavaRuntimeInfo provider, since the java security manager was deprecated in that version.
Please note that adding the version field unconditionally is only compatible with Bazel 6.2.x and 7.0.0 (or later).
However, during testing I noticed that the Java toolchain already depends on another recent Bazel feature (@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type) that was added in 6.4 and 7.0, so this is probably fine.
Using JDK 17+, java_test rules fail if Bazel cannot determine the runtime version from the JavaRuntimeInfo provider, since the java security manager was deprecated in that version.
Please note that adding the
version
field unconditionally is only compatible with Bazel 6.2.x and 7.0.0 (or later). However, during testing I noticed that the Java toolchain already depends on another recent Bazel feature (@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type
) that was added in 6.4 and 7.0, so this is probably fine.See also: https://github.com/bazelbuild/bazel/commit/7556e1107b666d10b660470a571631463c7eb4ec
Closes #552