Skip to content

Android Error – SDK Installer Doesn’t Detect the Java JDK

The Android SDK installer can't find the Java JDK and won't let you continue? Here are three solutions, including the common Windows 8 case.

Ramón Invarato

When you try to install the Android SDK, the installer doesn’t detect the JDK, so it won’t let you continue. The following error appears:

Error: Java SE Development Kit (JDK) not found.

Android SDK relies on the Java SE Development Kit (JDK).

Go to http://java.sun.com > Downloads > Java SE > JDK to download and install a JDK before continuing.

Note: A Java Runtime (JRE) is not enough to develop for Android.

The error will look like the following image:

Screenshot of the Android SDK installer showing the "JDK not found" error blocking the install

 

Solution 1 – If the Java JDK is really not installed

The Java JDK is used to develop Java software and gives you additional tools. The JDK is a development environment for building applications, applets  and various components using Java.

To download it, click here.

Here, click “Download” below the word JDK.

Java SE page with the JDK Download button highlighted

It will take you to a new window.

There, click “Accept License Agreement” so it lets you select the download.

Then download the Windows version that matches your system. If you don’t know which one, download the one called “Windows x86” (it’s best to download the one for your operating system; if your computer is modern, it’s probably x64).

JDK 7u3 page with Accept License Agreement checked and the Windows x86 and x64 installers highlighted

Once it has downloaded, run it and follow the wizard until it’s installed.

Solution 2 – The JDK is installed but the installer doesn’t detect it

This is a common problem and it’s fixed quickly. Don’t despair, it has a solution. To fix it, first click “Back” and then try one of the following solutions:

  1. Click “Next” again. This isn’t guaranteed to work, but sometimes it finds the JDK after going back to the JDK installation check screen a couple of times.
  2. Go to where the Java JDK is installed, usually at: “C:Program FilesJavajdk1.7.0_03bin”. Run the one called “javac” (a window will appear and disappear). Click “Next” in the SDK installer so it searches for the JDK again. 

Screenshot of Windows Explorer in the JDK bin folder with the javac executable highlighted

 

Solution 3 – The JDK is installed but the installer doesn’t detect it (common error on Windows 8)

This error usually happens on Windows 8, but it could also happen on other operating systems. The new operating system isn’t 100% compatible with everything yet, but there’s always a way to make it work.

The error may be slightly different, more like this:

Java SE Development Kit (JDK not found).

Error: Failed to find Java Version for 'C:Windowssystem32java.exe': [2] El sistema no puede encontrar el archivo especificado.

Android SDK relies on the Java SE Development Kit (JDK).

Go to http://java.sun.com > Downloads > Java SE > JDK to download and install a JDK before continuing.

Note: A Java Runtime (JRE) is not enough to develop for Android.

Screenshot of the Android SDK installer showing the JDK not found error with the Cancel button highlighted

But it basically says the same thing. Close the installer window.

To fix it, go to the search box (it’s in the top-left corner; click the magnifying glass) and search for "environment variables". Click the "Settings" box, and there choose "Edit the system environment variables".

Screenshot of searching for "environment variables" in Windows 8, with "Edit the system environment variables" highlighted

A window called "System Properties" will open on the desktop, where you click the "Environment Variables…" button. In the new window, called "Environment Variables", click the "New…" button. In the "New System Variable" box, enter the following:

  • Variable name: JAVA_HOME
  • Variable value:  The path where the Java JDK is installed; by default it’s C:Program FilesJavajdk

Screenshot of the steps to create the JAVA_HOME system variable pointing to the JDK path in Windows

In my case, which is the default location, the JDK is installed in the following folder; I copy its path and paste it into the "Variable value:" field.

Screenshot of Windows Explorer showing the JDK folder with its path highlighted to copy into JAVA_HOME

 Run the Android SDK installer again. It should now install normally.

“Android Error – SDK Installer Doesn’t Detect the Java JDK” by Ramón Invarato at jarroba.com, licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0. Registered at Safe Creative.

Ramón Invarato

I design and build data platforms and intelligent systems, and I enjoy sharing that experience here.

You may also like

Comments

Leave a comment


This site uses Akismet to reduce spam. Learn how your comment data is processed.