Java is a popular programming language, and Java Development Kit (JDK) is a software required to develop applications running on the Java platform. In this article, I would like to show you the detailed steps to set up Java development environment on Windows operating system by downloading and installing Oracle JDK - a commercial build of JDK made by Oracle corporation - the steward of Java technology, for Java version 22.

And you know, JDK 22 was released on March 2024 as a regular update of Java SE platform. And Oracle JDK 22 is a commercial distribution, which you can use for personal, development and production.

Follow the steps below to setup Oracle JDK 22 on Windows OS.

 

1. Download Oracle JDK 22 Installer for Windows

Oracle JDK 22 is distributed as Zip archive, EXE and MSI installer for Windows. It’s recommended to choose EXE/MSI installer which will make the installation process a breeze. Click this link to visit the official download page of Oracle JDK, you will see the following page appears:

Oracle JDK 22 download for windows

Click the download link next to x64 Installer (link marked number 1) to download EXE installer of Oracle JDK 22. Save the file to a desired location on your computer. The file size is about 164 MB.


2. Verify Installer File

Before launching the installer, it’s strong recommended to verity integrity of the installer file to make sure it is not tampered with. So open a new Command Prompt window, use the cd command to change the current directory to the location of the installer file. Then type the following command to get SHA256 checksum of the file:

certutil -hashfile jdk-22_windows-x64_bin.exe sha256

Compare the SHA256 hash value printed by this command against the one published on the download page (click the link marked number 2). You can use the installer file safely if both are identical. Otherwise you may need to re-download the installer.


3. Install Oracle JDK 22 on Windows



Next, double click the installer file to launch Oracle JDK 22 installer for windows. If you get a warning from Windows, click Install anyway. The setup program appears, click Next two times to proceed the installation with default installation path:

Oracle JDK 22 installer on windows

The setup will complete quickly, and you don’t have to configure any environment variables as it updates the Path system environment variable automatically.


4. Verify Oracle JDK 22 Installation on Windows

Open a new Command Prompt window, and type java -version and javac -version to check version of Java virtual machine and Java compiler, respectively. You will see the following output:

verify oracle jdk 22 on windows

Congratulations! You have installed Oracle JDK 22 successfully on your Windows OS. You now can start creating, developing, building and running Java applications. I hope you find this guide helpful, whether you just start your Java journey or you want to update to the latest Java version.

To see the setup in action, watch the following video:

 

Related Articles:


About the Author:

is certified Java programmer (SCJP and SCWCD). He began programming with Java back in the days of Java 1.4 and has been passionate about it ever since. You can connect with him on Facebook and watch his Java videos on YouTube.



Add comment