Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bazel refuses to start due to javac not being detected when it is #21918

Closed
solomoncyj opened this issue Apr 7, 2024 · 2 comments
Closed

bazel refuses to start due to javac not being detected when it is #21918

solomoncyj opened this issue Apr 7, 2024 · 2 comments
Labels
area-Windows Windows-specific issues and feature requests team-CLI Console UI type: bug untriaged

Comments

@solomoncyj
Copy link

Description of the bug:

Bazel refuses to load, complaines
FATAL: Could not find system javabase. Ensure JAVA_HOME is set, or javac is on your PATH. when i have java JDK

Which category does this issue belong to?

External Dependency

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

image

Which operating system are you running Bazel on?

Windows 10

What is the output of bazel info release?

7.1.1

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

No response

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

@github-actions github-actions bot added the team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. label Apr 7, 2024
@meteorcloudy meteorcloudy added team-Rules-Java Issues for Java rules area-java-toolchains javabase, java_toolchain flags, JDK selection, java_toolchain rules, java_tools repository and removed team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. labels Apr 16, 2024
@hvadehra
Copy link
Member

Looks like the error message is misleading on Windows, where, unlike linux, we only check for JAVA_HOME: https://github.com/bazelbuild/bazel/blob/master/src/main/cpp/blaze_util_windows.cc#L467-L479

@solomoncyj can you try setting the JAVA_HOME env variable?

@solomoncyj
Copy link
Author

alright thanks

@hvadehra hvadehra added team-CLI Console UI area-Windows Windows-specific issues and feature requests and removed team-Rules-Java Issues for Java rules area-java-toolchains javabase, java_toolchain flags, JDK selection, java_toolchain rules, java_tools repository labels Apr 29, 2024
@meisterT meisterT closed this as not planned Won't fix, can't repro, duplicate, stale May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Windows Windows-specific issues and feature requests team-CLI Console UI type: bug untriaged
Projects
None yet
Development

No branches or pull requests

7 participants