• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to check for 64-bit JDK (not JRE)  RSS feed

 
Marie Day
Greenhorn
Posts: 29
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm getting this error:
-------------------------------------------------------------------------------------------
No JVM installation found. Please install a 64-bit JDK.
If you already have a JDK installed, define a JAVA_HOME variable in
Computer > System Properties > System Settings > Environment Variables.
------------------------------------------------------------------------------------------
when I try to launch Android Studio.

At the command line, java -version outputs:
----------------------------------------------------------------------------------
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
----------------------------------------------------------------------------------
Does this mean the JDK is 64-bit?

I've been running java from the command line successfully for months.
My JAVA_HOME variable is
C:\Program Files (x86)\Java\jdk1.8.0_25
I double-checked that this is the correct location of the folder, and
my JAVA_HOME variable is in the same location as mentioned in the error.

I also have a jre1.8.0_45 folder at
C:\Program Files\Java\jre1.8.0_45
Which seems to be what java -version is referring to.

How can I be sure I have a 64-bit JDK?
 
Marie Day
Greenhorn
Posts: 29
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Update: I read that Java version 8 is not compatible with Android studio, but 7 is. So I installed
Java SE Development Kit 7u80
for Windows x64
downloaded from
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
I ran the installer, which placed the folder at C:\Program Files\Java\jre7, so I updated JAVA_HOME to that, and now I get this error message when I launch Android Studio:
-----------------------
JDK required
'tools.jar' seems to be not in Studio classpath.
Please ensure JAVA_HOME point to JDK rather than JRE
------------------------------------------------------------------

Any ideas what I can do to fix this?
 
Stefan Evans
Bartender
Posts: 1837
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you type java at the command line, it will find the first one on the path.
Presumably that is your JRE that you have installed.

Try typing this at the command line: %JAVA_HOME%\bin\java -version
That should tell you what the one in JAVA_HOME is.
Because it is installed under Program Files(x86) that is a good indication you have a 32bit installation.

What does your PATH variable look like?
Adding your java installation bin directory to the front of it should make the command line find the jre associated with the JAVA_HOME rather than the one it will have installed elsewhere.


EDIT:
In reaction to your new post.
Installing a JDK installs both a JDK and a JRE to your computer.
Take a look around for the jdk directory, also presumably under "Program Files"
 
Tapas Chand
Ranch Hand
Posts: 614
9
BSD Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marie Day wrote:I read that Java version 8 is not compatible with Android studio, but 7 is

I have JDK 1.8.0_45 and Android Studio is running fine with it.
May be you have to install the latest version of Android Studio.
I have version 1.2.2
 
Dave Tolls
Ranch Foreman
Posts: 3061
37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marie Day wrote:
I ran the installer, which placed the folder at C:\Program Files\Java\jre7, so I updated JAVA_HOME to that, ...


That's the JRE.
If that is the only folder it created then it hasn't installed a JDK.
There should be a jdk1.7.<whatever> folder. That's the JDK directory.
 
Marie Day
Greenhorn
Posts: 29
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tapas Chand wrote:
Marie Day wrote:I read that Java version 8 is not compatible with Android studio, but 7 is

I have JDK 1.8.0_45 and Android Studio is running fine with it.
May be you have to install the latest version of Android Studio.
I have version 1.2.2


I just download Android studio a couple of days ago, so I assume it's the latest version. How can I find out if it's 1.2.2? I downloaded it from the link below, which says it's Android 5.
http://developer.android.com/sdk/index.html
 
Marie Day
Greenhorn
Posts: 29
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dave Tolls wrote:
Marie Day wrote:
I ran the installer, which placed the folder at C:\Program Files\Java\jre7, so I updated JAVA_HOME to that, ...


That's the JRE.
If that is the only folder it created then it hasn't installed a JDK.
There should be a jdk1.7.<whatever> folder. That's the JDK directory.


I found it, this worked, thank you.
 
Marie Day
Greenhorn
Posts: 29
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stefan Evans wrote:When you type java at the command line, it will find the first one on the path.
Presumably that is your JRE that you have installed.

Try typing this at the command line: %JAVA_HOME%\bin\java -version
That should tell you what the one in JAVA_HOME is.
Because it is installed under Program Files(x86) that is a good indication you have a 32bit installation.

What does your PATH variable look like?
Adding your java installation bin directory to the front of it should make the command line find the jre associated with the JAVA_HOME rather than the one it will have installed elsewhere.


EDIT:
In reaction to your new post.
Installing a JDK installs both a JDK and a JRE to your computer.
Take a look around for the jdk directory, also presumably under "Program Files"


I found the jdk folder. That was the problem, thank you.

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!