简体   繁体   中英

Set JDK location for Android Studio without an Enviroment Vairable

I am running Windows 7 and just upgraded my Android Studio and it is not working anymore. I get a dialog that says it cant find the jdk. I have version .9 now. I do not have admin rights so I can not edit my Enviroment Variables. Is there a way I can tell Android Studio where the JDK is. Maybe command line args? I havent found any source that outlines if there are any.

Please note that I can not run Android Studio, so I cant update it from inside the application.

Also, I do have Cygwin.

Since, Android Studio was working before and only broke after the update, please check the Studio shortcut you're using to launch the IDE. By default, Android Studio points it to studio64.exe . If you have a 32-bit Java JDK installed use the studio.exe to launch the IDE.


If that doesn't help, see if you can create a JAVA_HOME user variable? You maybe able to do that even though you have a limited account. If you are unable to do so, as a last resort, move/copy the JRE (not JDK) into the Android Studio install location (right next to bin ). You need to name the folder jre or jre64 depending on which launcher you use studio.exe or studio64.exe .

I solved this. I download the Server JRE from the Oracle page. I then decompressed the gzip and untared it. I then then added to my ~/.bashrc file in cygwin "export JAVE_HOME=". Studio was able to find this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM