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¶
- Go to http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
- Scroll to the first section, labeled Java SE Development Kit 8u201
- Click on
Accept License Agreement
above the list of file (otherwise you won't be able to select a download) - See below for instructions for your machine/operating system.
Install on Mac OS X¶
- Choose the
Mac OS X
file namedjdk-8u201-macosx-x64.dmg
- Open/launch the
.dmg
file and run the package installer that's inside and follow the directions - Open a terminal and type the following commands to verify it's installed correctly:
javac -version
-
java -version
Homebrew
If you have Homebrew installed, you can install Java using
brew cask install java8
Install on Windows¶
- Choose the
Windows x64
(not x86) file namedjdk-8u201-windows-x64.exe
- Run the file, accepting all defaults from the installer
- Open up the system environment variables dialog and add the variable
JAVA_HOME
with the valueC:\Program Files\Java\jdk1.8.0_181
(or wherever the JDK was installed if you selected a different location) - Edit the system environment variable and append to the end:
;%JAVA_HOME%\bin
- Open a command prompt and type the following commands to verify it's installed correctly:
javac -version
java -version
Install on Linux¶
- Choose the rpm or tar.gz file as appropriate for your distribution
- For the tar.gz format:
- Untar the file using
tar -xvf <jdk-8u201-linux-x64.tar.gz> -C <destination-directory>
export JAVA_HOME=<destination-directory>/jdk1.8.0_201
- Append to the PATH
:$JAVA_HOME/bin
- Open a terminal and type the following commands to verify it's installed correctly:
javac -version
java -version