This message was deleted.
# community-support
s
This message was deleted.
v
Well, was
C:\Program Files\Java\jdk-20\bin\java.exe
correct?
n
i dont think so?
v
Which would have been the correct path?
Or if you are at 19 now, what would be the correct path and what says the error?
n
i think the correct path is C:\Program Files\Microsoft\jdk-11.0.16.101-hotspot\bin\java.exe at least thats what i get when i do where java
v
And what does the error say / what do you have in
JAVA_HOME
?
n
so i have C:\Program Files\Microsoft\jdk-11.0.16.101-hotspot\ in JAVA_HOME and the error im getting is The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location: C:\Program Files\Java\jdk-20\bin\java.exe
v
Then you most probably do not have set
JAVA_HOME
like you say you did, or you changed it in the UI and expect it to work on pre-existing terminal or other process which is not the case. Log out and back in or restart Windows, then try again.
n
i tried restarting again i am still getting the exact same message. im using android studio maybe its a problem with that idk. i have no idea about any of this
v
Well, depends on what you configured in AS. Go to the Gradle settings and look what you configured. You most probably did not configure to use
JAVA_HOME
which is one option, but either to use Java 20, or the project Java, or whatever.
As you didn't mention AS with any syllable, I of course assumed you use Gradle directly. 😄
n
sorry
do you know how i can change that in android studio
v
Go to the Gradle settings and just do it
Open the settings, put in Gradle in the search box