I'm trying to set the JAVA_HOME
environment variable - I need to set it to the 64 bit version.
To make sure I have the 64 bit version, I checked java -version
by the cmd prompt, and got the output:
Java version "1.7.0_25"
Java<TM> SE Runtime Environment <build 1.7.0_25-b17>
Java Hotspot<TM> 64-bit Server VM <build 23.25-b01, mixed mode>
I'm assuming the last line verifies I have 64-bit... so I went to check the exact path to type into the environment variable, and found that Program Files\Java\
does not contain a jdk
folder. However, Program Files (x86)\Java\
does. Instead, the former only has a jre7
folder.
I can't direct my environment variable to the 32-bit folder because Android Studio
keeps telling me that I need 64-bit java. What am I missing?
(If this belongs on SuperUser and not here, just comment below and i'll delete the question here)
I think you are looking at JRE
type
javac -version
in your command line
You can have multiple Javas installed. Sounds like you have a 32 bit JDK and a 64 bit JRE. 64 bit software is installed in the "program files" folder, and 32 bit software is installed in the "program files (x86)" folder.
a 64 bit JDK will live in /program files/java/jdkxxx
Download the 64 bit JDK installer and install it, and then point your JAVA_HOME to it.
The installer takes care of this so far as I remember, but you will want to modify your PATH variable as well to point to %JAVA_HOME%/bin; ... add that to the front of the path so that typing Java will find your JDK first.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With