git-bash shell on Windows 10
Spring boot project is using gradle 4.4
from project root running ./gradlew --version gives this error “Could not determine java version from ‘14.0.1’”
Windows PATH and JAVA_HOME are pointing to Open JDK 14 and gradle.properties in $USER_HOME/.gradle has org.gradle.java.home=C:/Program Files/Java/jdk1.8.0_202
per gradle doc gradle should use JAVA_HOME from this properties file. Specifying it on the command line like this,
./gradlew -Dorg.gradle.java.home=C:/Program Files/Java/jdk1.8.0_202 …
gives the same error.
Changing the PATH for current shell to point to JDK8 gives the same error.
The only way I can get ./gradlew --version to work is to set JAVA_HOME to JDK8 for the current shell before running the command.
Due to project constraints cannot upgrade gradle for the project. Please help!