Open
Description
I'm using Java 11 and therefore have the following in my .bazelrc:
run --javabase=@bazel_tools//tools/jdk:remote_jdk11
For java_binary rules, this works great, causing them to run with JDK 11. However, when I do a bazel run
on a springboot target, it always uses Java 1.8. I believe the reason is that it looks at JAVA_HOME, which is not taken from my environment but rather from the environment internal to the bazel server. I confirmed this by modifying springboot.bzl
to echo JAVA_HOME. It gave me jdk1.8 even though my JAVA_HOME is pointing to jdk-11.