Avoid "Directory ... used for java installations does not exist"


I have a multi-platform build. I am specifying org.gradle.java.installations.paths=C:/JDK11,C:/JDK17,/opt/java/jdk11,/opt/java/jdk17 in gradle.properties.

Works like a charm both on the Linux and Windows machines. But it always logs “Directory … used for java installations does not exist” for the paths for the other operating system.

Somebody has an idea how to avoid the messsages? For example specify different properties for Windows and Linux somehow?

Kind regards, Matthias Kraaz

This property is most likely not meant to be set on a checked in file as it specifies local installation paths. And to warn you that you maybe mistyped or miscopied or whatever I guess it warns you if the directory does not exist or is not a valid JDK.
Maybe you should better just set this property on each respective system in ~/.gradle/gradle.properties, or set it in environment variables that you then configure in the checked in file.