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.

<img src

=”/java-development-kit-tools_hu9b641dedd727bb8638cb7086c88cfd94_9653_640x0_resize_mitchellnetravali_3.png” alt=”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. <img src="/java-8-oracle-jdk-download-page_hu86893b2b634ba0ece24cbc6e4706ab09_44777_640x0_resize_mitchellnetravali_3.png"

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

Locate the Java SE Development Kit 8u331 section.

Check your Windows bit version 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. <img src="/java-8-oracle-jdk-download-link_hu135a1cc7566f9b4a53ab6d43dbafc1e9_158895_640x0_resize_mitchellnetravali_3.png"

alt=”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.

<img src="/oracle-account-sign-in_hud1a9bd57aade8eda1308b4f2db140c48_207586_640x0_resize_mitchellnetravali_3.png"

alt=”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 Files\Java\jdk1.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 as 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 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=”variables
Windows environment 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 Files\Java\jdk1.8.0_331.

Click OK.

<img src="/windows-new-user-variable-java-8-home_hu2479fe5f7d743e42b144e898cdab0931_6555_640x0_resize_mitchellnetravali_3.png"

alt=”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 java 8 edit path environment variables

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=”windows environment variables add java home path” />

Click OK once again to close the environment variables window.

Windows Java 8 config environment variables

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 version of the installed 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!!