I think that path is only used when Godot calls things in the JAVA SDK direction.
Because for XR exports we do a full gradlew build, it piggy backs on the environment settings I think. I wonder if this is something that can be improved because you’ll not be the only one that has multiple versions of Java in play.
It would be great if there were an optional editor setting for this. This could than be used as parameter for the gradle build if set, like e.g.:
-Dorg.gradle.java.home=/path/to/jdk/17
The JAVA_HOME JDK(21) would be used to start gradle, the configured JDK(17) would be used for the build itself. Thus i wouldn’t have to modify files in the android subfolder, which i would prefer to keep untouched.
@arassec That setting is available in the editor settings, not the project settings and was specifically added to address this type of issue.
You can just point to your jdk17 install and Godot will do the rest.