I was using java from this path C:\Program Files\Java\jdk-17
and I have used gradle-6.9 at that time. Later I have installed OpenJDK and now my JAVA_HOME is C:\Program Files\Eclipse Foundation\jdk-11.0.12.7-hotspot
. But now if I run gradle using gradle-6.9 version I am getting this
$ ./gradle
FAILURE: Build failed with an exception.
What went wrong: The supplied javaHome seems to be invalid. I cannot find the java executable. Tr
ied location: C:\Program Files\Java\jdk-17\bin\java.exeTry: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
But If I am using any other gradle version for example even 6.9.1 as well everything works fine
eg: 6.9.1, 7.x
I have tried removing cache folder as well but no hope, please help