In this post, we will go through steps involved to download and install JDK( Java Development Kit) The easiest way to install JDK is to extract the zip file and set the JAVA_HOME and Classpath environment variable for the JDK. However, we will look at the installation steps using the JDK installer.
First things first, We need to download and obtain a copy of the JDK installer. The latest JDK only supports 64-bit installers. Almost any computer now has a 64-bit processor. It is recommended that you install the latest 64-bit version of JDK.
JDK Installer file format example:
JDK zip file format example:
JDK 16 Install
Browse the official website to download JDK.
Download the JDK installer on to the computer.
Run the JDK Installer
Open Windows Explorer, navigate to the location where you saved the JDK installer.
Double-click on the file name to launch the install wizard.
You must have administrative permissions in order to install the JDK on Microsoft Windows. Click Yes on the UAC( User Access Control ) elevation dialog.
When the JDK installer starts, it shows the welcome screen. Click on the Next > button.
JDK 16 Install Screen
The JDK installer asks for the Destination folder. On this screen, we can change the JDK installation folder. In most cases, it is best to use the default destination folder. Once done click on the Next button.
When the JDK installation has been completed successfully, it should display a Complete screen. Click Close to exit the installer.
Set JAVA_HOME variable
Updating the PATH Environment Variable
If you do not set the PATH variable, you need to specify the full path to the executable file every time you run it.
It is useful to set the PATH variable permanently so it will persist after rebooting.
To set the PATH variable permanently, add the full path of the JDK directory to the PATH variable. Set the PATH variable as follows on Microsoft Windows:
- Click Start, then Control Panel, then System.
- Click Advanced, then Environment Variables.
- Add the location of the bin folder of the JDK installation to the PATH variable in System Variables.
Older JDK 8
Instructions and Install Screens:
The file jdk-8version-windows-i586-i.exe is the JDK installer for 32-bit systems. The file jdk-8version-windows-x64.exe is the JDK installer for 64-bit systems. If you downloaded either file instead of running it directly from the web site, double-click the installer’s icon.