Skip to content

Conversation

@plaird
Copy link
Contributor

@plaird plaird commented Dec 22, 2024

Just some failed attempts at #16 publishing as a PR just to have a record of what I have tried.

This PR works as expected if you specify tool runtime in your run command:

bazel run --tool_java_runtime_version=remotejdk_17  examples/helloworld 
bazel run --tool_java_runtime_version=remotejdk_21  examples/helloworld 

But does not work:

  • if the parameter java_runtime_version is used, which I would expect to work
  • by default, Bazel is picking 11 for tool runtime, so this will break workspaces where users need 17+ (Boot3) and don't define the version in .bazelrc

If we can find a solution this should only occur in a major upgrade in rules_spring because of the many cases that may break. I am personally confused by all of the bugs and changes in the java toolchain resolution in Bazel over the years, and changing anything in rules_spring that touches that should be done with great care.

We offer a set of options for specifying the JVM used in Bazel run, hopefully you can find an option that works for you.

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

Successfully merging this pull request may close these issues.

2 participants