Hello everyone, welcome back to techbrushup. In this tutorial, we will learn how to install Java on window machine. So guys, let's do it.
Additional info:
prerequisite:
- Windows 10 and above
- Machine with Administrator privileges
- Internet
Check if Java Is Installed
- Open a command prompt
- Run the following command:

Download Java
Step 1: Go to java official website Official Download Page
Step 2: Under available now choose Windows and download x64 Installer.

Run the Downloaded File
Step 3: Start the installation by double-clicking the downloaded file.
Step 4: Now click next

Step 5: Now click next

Step 6: Sucessfully installed and close it.

Set Environmental Variables in Java
Step 7: Open the Start menu and search 'environment variables'.

Step 8: In the System Properties window, under the Advanced tab, click Environment Variables

Step 9: Under the user variables category, click on New set variable name 'JAVA_HOME' and variable value 'C:\Program Files\Java\jdk-21' and click on OK.

Step 10: Under the System variables category, select the Path variable and click Edit:

Step 11: Click the New button and enter the path to the Java bin directory(path is usually C:\Program Files\Java\jdk-17.0.1\bin.):

Step 12: Test the Java Installation
