bazelbuild / bazel

a fast, scalable, multi-language and extensible build system
https://bazel.build
Apache License 2.0
23.09k stars 4.04k forks source link

Java "11" is not required (especially for Windows) #23882

Open tats-u opened 6 days ago

tats-u commented 6 days ago

Page link:

https://bazel.build/install/windows#install-compilers

Problem description (include actual vs expected text, if applicable):

https://github.com/bazelbuild/bazel/blob/83830c264f135893e1db1a425ea7c008717e1f39/site/en/install/windows.md?plain=1#L108

This line is incorrect and confused me a lot. It should be removed.

https://github.com/google/mozc/issues/932#issuecomment-2395098791

Bazel for Windows these days automatically installs Zulu 21.

image

 tatsu@TATSU-DPC-2ND  ~\..\..\..\..\..\bin  ./java --version
openjdk 21 2023-09-19
OpenJDK Runtime Environment Zulu21.28+85-CA (build 21+35)
OpenJDK 64-Bit Server VM Zulu21.28+85-CA (build 21+35, mixed mode)
 tatsu@TATSU-DPC-2ND  ~\..\..\..\..\..\bin  java --version
openjdk 21.0.3 2024-04-16 LTS
OpenJDK Runtime Environment Temurin-21.0.3+9 (build 21.0.3+9-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.3+9 (build 21.0.3+9-LTS, mixed mode, sharing)
 tatsu@TATSU-DPC-2ND  ~\..\..\..\..\..\bin  bazel --version
bazel 7.3.2

Where do you see this issue? (include link to specific section of the page, if applicable)

No response

Any other information you'd like to share?

Python "3.6" is a stale information too.

fmeum commented 5 days ago

Would you be interested in sending a PR?

tats-u commented 5 days ago

Not now or in this week. It's a bad idea to expect too much from my contribution. If I were a member, I would remove the JDK entry. Do you agree with it?

yukawa commented 5 days ago

If I were a member, I would remove the JDK entry. Do you agree with it?

Sorry, my comment at https://github.com/google/mozc/issues/932#issuecomment-2395100819_ might have been misleading.

I was trying to explain that running Bazel itself would not require any explicit installation of Java Runtime Environment (JRE) these days, while the installation document looks to be saying that an explicit explicit installation of Java Development Kit (JDK) will be needed to build code written in Java by using Bazel, which I believe is still valid (except for which JDK version should be installed most likely depends on the target project you want to build).

https://github.com/bazelbuild/bazel/blob/83830c264f135893e1db1a425ea7c008717e1f39/site/en/install/windows.md?plain=1#L108-L112

If I were a member, I would remove the JDK entry. Do you agree with it?

In https://github.com/google/mozc/issues/932 the reporter did not need to install JDK because the project that the reporter was trying to build a project (for Windows) did not have any Java build target. This does not mean that JDK is completely unnecessary to build other projects that need to build Java source code. So removing JDK entry may also cause another confusion. Just fyi.

tats-u commented 5 days ago

Thank you for the additional explanation. We might verify whether the installation of JDK is really unnecessary using Sandbox or VM.