Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To use the latest supported language level from the --host_javabase, use VanillaJavaBuilder (which should work with most host JDKs) and leave the source/target/bootclasspath unset so they default to the latest supported versions. With this in place, new java_runtime can be used, e.g.: java_runtime( name = "jdk11", java_home = "/usr/lib64/jvm/java-11", visibility = ["//visibility:public"], ) Now the JDK11 can be used with the language level 11: $ bazel build --host_javabase=:jdk11 \ --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_vanilla \ --java_toolchain=@bazel_tools//tools/jdk:toolchain_vanilla \ :a Related: bazelbuild#5723 Closes bazelbuild#5984. PiperOrigin-RevId: 213859466
- Loading branch information