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

How to set JVM version? rules_scala keeps insisting on using Java 11 #1576

Open
grepwood opened this issue May 13, 2024 · 1 comment
Open

Comments

@grepwood
Copy link
Contributor

I would like to use Java 17 but it keeps trying to use Java 11. How can I force rules_scala to stop trying to get older Java? I tried the following options:

--host_javabase=@bazel_tools//tools/jdk:toolchain:java17
--javabase=@bazel_tools//tools/jdk:toolchain:java17
--host_java_toolchain=@bazel_tools//tools/jdk:toolchain:java17
--java_toolchain=@bazel_tools//tools/jdk:toolchain:java17

and none of them work in the end. I'm on Bazel 6.5.0 btw.

@crt-31
Copy link
Contributor

crt-31 commented May 16, 2024

Try using --tool_java_runtime_version=remotejdk_17. That should be what the scala compiler is hosted on.
For what gets used during run and test, use --java_runtime_version=remotejdk_17.

(I think host_javabase and java_toolchain are both deprecated at this point).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants