I am using a fairly stock Fedora 32 machine, where there is by default a JRE installed through the package manager, but not a JDK. If JavaToolchainQueryService fails to probe a JDK, it crashes the build, rather than discarding the JDK JavaToolchainQueryService assumes that a JRE is always part of a JDK There are perhaps even two underlying bugs: ![]() If this diangosis is correct, you should be able to reproduce the bug by installing a JRE, without a JDK, somewhere on your machine, where Gradle will find it. The probe fails, and this makes the build fail. It somehow detects a JRE i have installed, assumes it is a JDK, and probes it. However, it makes the assumption that each toolchain is a JDK. ![]() As part of initialisation, the JavaToolchainQueryService searches the machine for toolchains, and validates each one. What i think is happening is that because i have specified the languageVersion, the JavaToolchainQueryService is being used to find a suitable toolchain. ![]() Caused by: : Unable to configure Java installation, probing failed with the following message: A problem occurred starting process 'command '/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.86_64/bin/java''Īt .internal.JavaInstallationProbe$ProbeResult.assertOk(JavaInstallationProbe.java:136)Īt .internal.JavaInstallationProbe$ProbeResult.getJavaHome(JavaInstallationProbe.java:99)Īt .internal.JavaToolchain.(JavaToolchain.java:47)Īt .(JavaToolchainFactory.java:41)Īt .(JavaToolchainQueryService.java:86)Īt .(JavaToolchainQueryService.java:68)Īt .$findMatchingToolchain$0(JavaToolchainQueryService.java:56)
0 Comments
Leave a Reply. |