• 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

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

 
Ranch Hand
Posts: 30
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Ranch Hand
Posts: 30
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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"
 
Ranch Hand
Posts: 624
9
BSD Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Ranch Hand
Posts: 30
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Ranch Hand
Posts: 30
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Ranch Hand
Posts: 30
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
reply
    Bookmark Topic Watch Topic
  • New Topic