Installing The Java Development Kit (JDK)

Windows

  1. First determine if your machine is 32-bit or 64-bit
    • If you go to Local Disk (C:) (or maybe (D:)) in the File Explorer there will be a folder named "Program Files" and maybe one named "Program Files (x86)". If your Operating System is 64-bit then "Program Files" is for 64-bit programs and "Program Files (x86)" is for 32-bit programs. If your Operating System is 32-bit then you will just have "Program Files" and it will be for 32-bit programs.
  2. If your operating system is 64-bit then you will download the Windows x64 download from Oracle. If 32-bit then you will download the Windows x86 download from Oracle. Download the appropriate installer here.
  3. NOTE: Make sure that you download the Java Development Kit (JDK) not the Java Runtime Environment (JRE). The JRE only allows you to run java programs, in order to develop your own java programs you will need the JDK.

  4. Run the installer that you just downloaded. If your system is 64-bit then java will install in your "Program Files" folder. (You may also have a "java" folder in "Program Files (x86)" and you should ignore it because the java kit you are currently downloading will NOT install there.) If your system is 32-bit then java will install in your "Program Files" folder.
  5. Add the path to the bin folder in the java folder that you just installed to your PATH environment variable. Make sure that it is the path to the bin folder and not the path to a file inside the bin folder. eg: C:\Program Files\Java\jdk1.9.0_11\bin
  6. Verify that you have successfully installed java.

Mac OS X

  1. Make sure that you have installed Homebrew before proceeding! Look at the top of the resources page on this website for instructions on installing Homebrew.
  2. Run the folloing command in the Terminal:
  3. brew update

    brew tap caskroom/cask

    brew install Caskroom/cask/java

    The commands running successfully looks like this:

    Homebrew-java-install-commands.png
  4. Verify that you have successfully installed java.

Linux

  1. Download and run the appropriate Java Development Kit installer from http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html

OR

For Ubuntu and other debian based distribution, install openjdk using your default package manager (apt-get is a very common default package manager). This is the reccomended method.

OR

For Fedora-based and other distros that use the Redhat Package Manager format, download the correct "Linux RPM" architecture from Java Downloads
  1. Add the JDK's bin directory to your PATH environment variable, if necessary.
  2. Verify that you have successfully installed java.

All Operating Systems

To confirm that your java installation was successful:

Oracle's installation instructions

Oracle, the company that makes Java, has documentation here