Java discovery fails for Temurin 23
Current Behavior
I'm using ort (https://github.com/oss-review-toolkit/ort/) and came across a problem with gradle's discovery of Java versions. It looks like gradlew's auto discovery of Java versions doesn't recognize Temurin 23, but recognizes Temurin 21.
Starting a Gradle Daemon (subsequent builds will be faster) Daemon JVM discovery is an incubating feature.
FAILURE: Build failed with an exception.
What went wrong: Cannot find a Java installation on your machine (Linux 6.1.0-26-amd64 amd64) matching: Compatible with Java 21, vendor matching('Adoptium') (from gradle/gradle-daemon-jvm.properties).
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org/.
This is on Debian bookworm, but I've had similar problems on my Windows machine.
The relevant bug in ort is this: https://github.com/oss-review-toolkit/ort/issues/9293
Unfortunately, I don't have much more to say, since I don't know anything the Gradle world. :-)
Expected Behavior
Temurin 23 is recognized and ort builds.
Context (optional)
No response
Self-contained Reproducer Project
Get ort (https://github.com/oss-review-toolkit/ort.git), install Temurin 23 (only) and do ./gradlew installDist.
Gradle version
8.10.2
Build scan URL (optional)
No response
Your Environment (optional)
No response
This issue needs a decision from the team responsible for that area. They have been informed. Response time may vary.
We'll take a look
I think this is a misunderstanding. I gather from above that you are expecting that JDK 23 should work even though gradle-daemon-jvm.properties contains toolchainVersion=21. The daemon toolchain version matching requires an exact match on the JDK version (i.e. given a choice of Java 23, 21 and 19, use 21). There is no capability yet to detect and use a "compatible" version. If you switch the toolchainVersion to 23, it should accept Java 23 JDK.