I have a weird case where running `./gradlew javaT...
# community-support
s
I have a weird case where running
./gradlew javaToolchains
includes
Copy code
+ Eclipse Temurin JDK 21.0.4+7-LTS
     | Location:           /home/sebastian/.gradle/jdks/eclipse_adoptium-21-amd64-linux.2
     | Language Version:   21
     | Vendor:             Eclipse Temurin
     | Architecture:       amd64
     | Is JDK:             true
     | Detected by:        Current JVM
but if I add
gradle/gradle-daemon-jvm.properties
with
Copy code
toolchainVersion = 21
I start getting
Copy code
* What went wrong:
A problem occurred configuring project ':buildSrc'.
> Failed to calculate the value of task ':buildSrc:compileJava' property 'javaCompiler'.
   > Toolchain installation '/usr/lib/jvm/java-21-openjdk-21.0.4.0.7-2.fc40.x86_64' does not provide the required capabilities: [JAVA_COMPILER]
Does that make sense to anyone? Why wouldn't Gradle just use the Adoptium 21 JDK it detected before for the daemon? PS: At least the detection is right in that the system Java installation lacks
javac
.
Looks like I can at least work around this issue by explicitly specifying a toolchain vendor like Adoptium.
v
Sounds like maybe a shortcoming, i.e. bug, in that incubating feature that you should report.
s
Yeah, done. But creating those mandatory reproducers is always so... annoying 😉
👌 1