How to install Java JDK 1.8 on Windows 10 Home

The Java Development Kit and Runtime Environment are distributed by Oracle. “Java 8” refers to release 1.8. Java 10, the latest (June 2018) release is the first i have seen in the new naming convention. The simplest way to put it, is that a Java installation allows for Java programs to run on our Windows 10 computer. There are two main flavors of Java, the JDK, which allows development of Java, or the JRE which allows the execution of JARs. In this case we will do the JDK, as it will allow us in the future to build our SPARK installation

To find the executable for the install, search online for “java jdk 1.8 download” and find a the correct page inside It will look something like this:

JAVA SE Development kit (JDK)
Dialog to select the version for your operating system. The download link will become active after we have hit Accept for the licence agreement

in the setup dialogs, select the file path of the Java installation. I prefer to not install the JAVA Home under “Program Files”, as i feel uncertain whether all sorts of code will be able to process the space in the filename, or it will have to be defined as PROGRA%1. Also the Java path will have to be added to the machine’s file PATH, another reason to keep the tree short.

Once the installation wizard has finished, we need to create environment variable JAVA_HOME, and add the path to the java.exe program to the computer’s PATH system variable.

The way to do this, in Windows 10, is to click the mouse on the magnifying glass button, right next of the Start menu. This is this:

Getting access to environment variables
Click on the magnifier glass, and type “environment”

Windows will offer “Edit the system environment variables (Control Panel) so we select that.Click on “New…” to add the user variable for your account and then append the %JAVA_HOME%\bin to the PATH

Accessing Windows 10 Environment Variables
Click on “Environment Variables…”
it is important, to set the user variables correct for the user who will be accessing the JAVA Home

A machine can have more than one paths to JRE/JDK. Changing JAVA_HOME and PATH is all it takes to “activate” a certain version of Java. To confirm the installation was successful, and indeed we are using the version we need, we need to open a windows shell (again we can use the magnifier and type “cmd“) and then type java -version. This will both validate that the correct version of Java is active, but also that the system file path has access to the Java executable

Java installation finish
we ran this command from the user’s home path, and verified that Java 1.8 is available

A word of caution: if Oracle software is already installed, it has placed its Java path to the beginning of the PATH string.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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