How to Download and Install JDK 1.8 on Windows – CodeNotFound

<img src="/download-install-jdk-8-windows_hu37bce26f34f19b60a7383ce1bdf0957f_17401_640x0_resize_mitchellnetravali_3.png"

alt=”download install jdk 8 windows” />

This tutorial has everything you need to know about installing JDK 8 on Windows

.

If you’re new to Java, I’ll show you how to set up the Java Development Kit.

What if you are a Java professional? I will highlight the necessary links that you can use to download the installer.

Bottom line:

If you want to get started with Java, you’ll love this tutorial.

What is

a JDK? #

When you want to create a Java application, you need a Java Development Kit (JDK). It contains tools that allow you to develop and run your Java program.

java development kit tools

One of these development tools is a compiler (javac) that converts Java source code (.java files) into Java bytecode (.class files). Other tools include a cabinet (jar) and a documentation generator (javadoc).

The JDK also contains a Java Runtime Environment (JRE) that is capable of executing compiled Java code. To do this, the JRE uses Java libraries and a Java virtual machine (JVM) that executes the compiled Java code.

There are different JDK implementations available. The official reference implementation is maintained by Oracle.

Please note that Oracle has changed the license of its JDK. Instead of having a single

JDK build that you can use for free, they now have two different JDK builds: Oracle JDK (commercial): You can use this in development and testing for free, but if you use it in

    production, you have to pay for it.

  • Oracle OpenJDK (open source): You can use it for free in any environment

.

Download Oracle JDK 8 #

Go to the Oracle

Java SE 8 download page.

java 8 oracle jdk download page

Look for the Java SE Development Kit 8u331 section.

Check your bit version of Windows and click the appropriate link

😛 ara 32-bit = x86 Windows installer For 64-bit = x64 Windows installer

In this guide, we will download the 64-bit installer: jdk-8u331-windows-x64.exe.

java 8 oracle jdk download link

Accept the license pop-up window and click the Download jdk-8u331-windows-x64.exe button.

<img src="/

java-8-oracle-jdk-download-license_hu31caab66e2335b74881aca07da405d1f_29627_640x0_resize_mitchellnetravali_3.png”

alt=”java 8 oracle jdk
download license” />

You will need an Oracle account to download the JDK. Log in with an existing account or create a new account to continue.

oracle account sign in

Wait for the

download to complete

.

See the Java file section for earlier versions such as 1.8.0_202

.

Install Oracle JDK 8 #

Open the location of the downloaded executable

. <img src="/windows-java-8-oracle-jdk-installer-executable_hu24847f8983d10ef5aa9b22c2cabe42ca_39381_640x0_resize_mitchellnetravali_3.png"

alt=”windows java 8 oracle jdk installer executable” />

Double-click to run the installer

.

In Windows 10 a pop-up window will appear: The application you are trying to install is not a

Microsoft verified application

Click Install anyway

.

Windows app not verified by Microsoft

The JDK installer will start. Click Next.

<img src="/java-8-oracle-jdk-installer-start_hu3cd8c15db1d52341c953ab27bf71834f_21613_640x0_resize_mitchellnetravali_3.png"

alt=”java 8 oracle jdk installer start” />

You can change the installation location by clicking the Change… button.

In this example, we keep the default installation location of C:Program FilesJavajdk1.8.0_331. From now on we will refer to this directory as [JAVA_INSTALL_DIR].

<img src="/java-8-oracle-jdk-installer-jdk-location_hu9b8e8155cc30b75960cc80c76b66b4f8_21297_640x0_resize_mitchellnetravali_3.png"

alt=”java 8 oracle jdk installer jdk location” />

We will not install the public JRE

because the JDK development tools already include a private

JRE.

Select the public JRE drop-down menu and click This feature will not be available. as shown below.

java 8 oracle jdk installer disable public jre

Click Next to start the installation.

<img src="/java-8-oracle-jdk-installer-custom-setup_hu1dabb2df59c5390c49a04115635eb3b4_21558_640x0_resize_mitchellnetravali_3.png"

alt=”java 8 oracle jdk installer
custom setup” />

The JDK installation will now start.

A progress bar shows the various steps that are executed.

java 8 oracle jdk installer progres

When the installation is complete, click Close.

<img src="/java-8-oracle-jdk-installer-finish_hu006b7e891e45966b0bae5593d6505090_15035_640x0_resize_mitchellnetravali_3.png"

alt=”java 8 oracle jdk installer finish” />

Configure Oracle JDK 8#

Now that the JDK is installed we need to configure it.

First we set up an environment variable that will point to our JDK installation.

In the Windows search box, type env.

Click Edit Environment Variables for your account shortcut.

windows edit environment variables for your account

Wait for the environment variables window to open

.

Click New….

<img src="/windows-environment-variables-new_huc3aa1f43c26d60c5336387db587b0c5b_20983_640x0_resize_mitchellnetravali_3.png"

alt=”environment variables
. Windows new” />

Enter JAVA_HOME as the variable name. Enter [JAVA_INSTALL_DIR] as the variable value.

In this tutorial, the Java installation directory is C:Program FilesJavajdk1.8.0_331.

Click OK.

windows new user variable java 8 home

Next, we need to set the PATH environment variable so that we can run Java from a command prompt

.

Select the Path variable. Click Edit….

windows environment variables java 8 edit path

Click New and type %JAVA_HOME%bin as shown below.

Click OK.

<img src="

/windows-environment-variables-add-java-home-path_hu829d2563f9a5d158420adca037c2b96a_10215_640x0_resize_mitchellnetravali_3.png” alt=”
the Windows environment variables add java home path

” />

Click OK once again to close the

environment variables window. <img src="/windows-environment-variables-java-8-config_hue40e25f1b99373daa876306b015bc8c4_26877_640x0_resize_mitchellnetravali_3.png"

alt=”windows environment variables java 8 config” />

If a Path variable does not exist, you must create it. Use Path as the variable name and %JAVA_HOME%bin as the variable value.

Test your Oracle JDK 8 installation #

Let’s test the configuration

.

In the Windows search box, type cmd

.

Click the Command Prompt shortcut

.

<img src

=”/windows-open-command-prompt_hu03933312859d6e31ea632a07d0d746aa_118752_640x0_resize_mitchellnetravali_3.png” alt=”windows open command prompt” />

Wait for the command prompt to open

.

Type the following command, and then press ENTER.

windows cmd java version

The above command prints the installed version of the JDK: 1.8.0_331.

<img src="/windows-cmd-java-version-jdk-8_hu558e165c9011ba1af859dfb07a4ea6ab_9509_640x0_resize_mitchellnetravali_3.png"

alt=”windows cmd java version
jdk 8″ />

Congratulations, you have installed JDK 1.8 on Windows 10!

Now take the next step and write your first Java program.

Let me know if you liked this post.

Leave a comment below.

Thank you!!

Contact US