Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

android studio cannot find jdk in windows solution

 
Ranch Hand
Posts: 52
1
MySQL Database Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Stephen Black
Ranch Hand
Posts: 52
1
MySQL Database Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
You save more money with a clothesline than dozens of light bulb purchases. Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic