Install JDK (Windows/Mac)

Install JDK

In order to develop Android apps, you'll first need to install the latest version of the Java Developer Kit (JDK) if it is not already installed.

JDK as the name implies is a kit (a toolkit or set of tools) that is used to develop Java apps.

TIP: To check to see if you have the environment variables set correctly and the JDK installed, open up the Command Prompt (Window) or the Terminal app (Mac) and type javac -version or java -version at the prompt. If you see a message that says, "... is not recognized as an internal or external command...", on Windows or prompted to install it on the Mac, you will need to install it.


TIP: How to open the Command Prompt or Terminal:


  1. Go to http://java.oracle.com/.
  2. Click on the Java SE link under Top Downloads.

  3. NOTE: SE stands for Standard Edition.

    TIP: The above step was listed to let you know we will be working with the Standard Edition of Java. A shortcut to the Java SE download page is http://www.oracle.com/technetwork/java/javase/downloads/index.html.

  4. Click the JDK Download button.

    CAUTION: Don't mistakenly select the JRE button instead of the JDK button. The JRE version is the Java Runtime Environment that implements the Java Virtual Machine (JVM) which actually executes Java programs. If you wanted to run Java programs, but not develop them, you would download the Java Runtime Environment, or JRE™. This is akin to using Adobe Acrobat Reader instead of the Adobe Acrobat Pro for creating PDF files. It is important to note the different between Java, JVM, JRE and JDK.



  5. On the next screen that appears, select the Accept License Agreement radio button for the LATEST VERSION (e.g., second table) and then choose the link for your OS version (e.g., jdk-8u31-windows-x64.exe for Windows or jdk-8u31-macosx-x64.dmg for Mac).

  6. CAUTION: x86 is for a 32-bit OS and x64 is for a 64-bit OS. Ensure you download the correct version.

    TIP: To check to see if you have a 32-bit or 64-bit OS

  7. Depending on the browser that you are using, you may be able to click on a Run button. Otherwise, double-click on the downloaded file and follow the installation prompts.

    NOTE: You will see two main dialog boxes that appears, the first is used to install the JDK (denoted by the jdk in the file path) and the second one is used to install the JRE denoted by the jre in the file path).
  8. On the second installation screen next to the phrase installed to: write down the location where the JDK will be installed. (e.g., C:\Program Files\Java\jdk1.8.0_112\).
  9. Click the Close button to finish the installation of the JDK and JRE.
  10. CHECK POINT: Open the Command Prompt (Windows) or Terminal (Mac) and type java -version. You should see the Java version number displayed (e.g., 1.8.0_66):
    NOTE: The _XXX number at the end of the version number is not that important. It represents the build number of the current version. In the case above, version 8 of Java.
  11. On the Mac, there was a bug with the latest version of the JDK that interacted with IntelliJ Idea. Later, if you open Android Studio and a dialog box tells you there is a problem with working with dialog boxes, you may need to downgrade to avoid the bug.