This message was deleted.
# community-support
s
This message was deleted.
t
Did you apply the foojay plugin to the project?
m
This is an external project that I do not control
I'm also building in an environment that would discourage downloading JDKs from afar
t
Apologies I misread your question at first. You could try running the gradlew -q javaToolchains command to see what jdks it can find but not sure if it'll hit that error too early to give any useful output or not.
v
You missed to read the first sentence
m
Yeah, doing so would show the JDK that I used to run Gradle (assuming
-Porg.gradle.java.installations.auto-detect=false
). My question is more about why 17 can't be used to satisfy 11 or 8
v
Gradle will sort all the JDK/JRE installations matching the toolchain specification of the build and will pick the first one. Sorting is done based on the following rules:
If you say you want an 8 toolchain, you can an 8 toolchain, not 8 or newer (which is not yet possible)
So the 17 toolchain is not in the list that is thereafter sorted by precedence
If you did not have specified a language version, but only a vendor, let's say Adoptium, and Gradle found Adoptium 8 and Adoptium 17 toolchains, then the 17 toolchain takes precedence
👌 1
m
So
higher major versions take precedence over lower ones
as a rule could basically never be used, currently? Or perhaps some vendors dont use major versions that match the JDK language version? Maybe that's it...
v
Why?
Do not specify a language version but just a vendor as I said
m
Ok, I think I assumed that the language version was always in play as a filter criterion, hence the confusion over major version precedence. Thanks
v
Then it can find multiple major version for that vendor and the rule will kick in
m
Thanks again
👌 1