In this tutorial, I am going to show you how to set JAVA_HOME on Windows10 operating system.
Set JAVA_HOME on Windows10 :
It will take several steps to create JAVA_HOME.
Open Environment Variables :
Search for Advanced System Settings in the Search box like below:

by selecting the above Advanced System Settings, you can see the below System Properties window.

Click on Environment Variables >

Click on New button under System variables session to create JAVA_HOME :

Enter variable name as “JAVA_HOME”, give variable value as your JDK path and click Ok.

Now select the Path variable and click on the Edit button :

Now opens another window like below: This is a new widow introduced from Windows10.

Here click on the new button and add environment variable %JAVA_HOME%\bin like below.

Click on OK.
Test :
Open the command prompt and execute below commands:

Happy Learning 🙂