Respect JAVA_HOME before searching JDK under "C:/Program Files/Java"
Fixed
RELNOTES: None
@@ -55,7 +55,7 @@ if is_windows; then
# moving the Windows-specific TEST_TMPDIR into TestStrategy.
TEST_TMPDIR_BASENAME="$(basename "$TEST_TMPDIR")"
- export JAVA_HOME="$(ls -d C:/Program\ Files/Java/jdk* | sort | tail -n 1)"
+ export JAVA_HOME="${JAVA_HOME:-$(ls -d C:/Program\ Files/Java/jdk* | sort | tail -n 1)}"
export BAZEL_SH="$(cygpath -m /usr/bin/bash)"
fi
