Skip to content

Java 8 Installation

These instructions are for downloading and installing the Java 8 development kit from the Oracle web site.

If you already have it installed, then validate using the instructions below.

Validate Installation

To check your installation, at a command prompt/terminal, type the following

java -version

If all is well, you'll see something like:

java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

To make sure the Java compiler (javac) is also working, type the following:

javac -version

Should result in something like:

javac 1.8.0_181

If any of the above doesn't look right, follow the instructions below.

Download Installer

  1. Go to http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
  2. Scroll to the first section, labeled Java SE Development Kit 8u201
  3. Click on Accept License Agreement above the list of file (otherwise you won't be able to select a download)
  4. See below for instructions for your machine/operating system.

Install on Mac OS X

  1. Choose the Mac OS X file named jdk-8u201-macosx-x64.dmg
  2. Open/launch the .dmg file and run the package installer that's inside and follow the directions
  3. Open a terminal and type the following commands to verify it's installed correctly:
  4. javac -version
  5. java -version

    Homebrew

    If you have Homebrew installed, you can install Java using brew cask install java8

Install on Windows

  1. Choose the Windows x64 (not x86) file named jdk-8u201-windows-x64.exe
  2. Run the file, accepting all defaults from the installer
  3. Open up the system environment variables dialog and add the variable JAVA_HOME with the value C:\Program Files\Java\jdk1.8.0_181 (or wherever the JDK was installed if you selected a different location)
  4. Edit the system environment variable and append to the end: ;%JAVA_HOME%\bin
  5. Open a command prompt and type the following commands to verify it's installed correctly:
  6. javac -version
  7. java -version

Install on Linux

  1. Choose the rpm or tar.gz file as appropriate for your distribution
  2. For the tar.gz format:
  3. Untar the file using tar -xvf <jdk-8u201-linux-x64.tar.gz> -C <destination-directory>
  4. export JAVA_HOME=<destination-directory>/jdk1.8.0_201
  5. Append to the PATH :$JAVA_HOME/bin
  6. Open a terminal and type the following commands to verify it's installed correctly:
  7. javac -version
  8. java -version