Forums Register Login

android studio cannot find jdk in windows solution

(1 cow)
+Pie Number of slices to send: Send
I have found a problem with the Android Studio studio.bat file
and here it is

Do you see the problem in the last 2 lines of code?
It seems that if your environmental variable is %JAVA_HOME% the batch file will GOTO error
and an error message will be displayed and that's it NO ANDROID STUDIO FOR YOU,
even though %JAVA_HOME% contains a valid path, but if the environmental variable is something like
%ANDROID_STUDIO_JDK% like mine is because I created it myself then it will work

PROPOSED SOLUTIONS
(1) Edit the batch file
Where you see this

Change it to this

(2) Create an environmental variable named %ANDROID_STUDIO_JDK%
as shown here
https://kb.wisc.edu/cae/page.php?id=24500
+Pie Number of slices to send: Send
Well done! It's not everyday, someone posts a solution even before anybody posts the problem!
For your effort, you just earned yourself a cow! Moo!

Did you know we have a Android FAQ which is a Wiki? In other words you can edit it yourself to add this useful information to that page!
+Pie Number of slices to send: Send
The reason that nobody has asked yet is becuase this problem
only existed for such a short amount of time.
The latest Android Studio does not even have or require a .bat file
so this solution is outdated
I therefore think that it is best that this information NOT be in the wiki

Unfortunately I was unlucky enough to install Android studio just when the problem existed
Space pants. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1630 times.
Similar Threads
Error in starting Jboss through Command Prompt
jboss on windows 98
Android does not recognize the JVM
startup.bat stops itself
eclipse and netbeans same error about android.R class
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 01:11:35.