Here are the typical steps to set JAVA_HOME on Windows 10.
- Search for Advanced System Settings in your windows Search box. Click on Advanced System Settings.
- Click on Environment variables button: Environment Variables popup will open.
- Goto system variables session, and click on New button to create new variable (HOME_PATH), then New System Variables popup will open.
- Give Variable Name: JAVA_HOME, and Variable value : Your Java SDK home path. Ex: C:\Program Files\java\jdk1.8.0_151 Note: It should not include \bin. Then click on OK button.
- Now you are able to see your JAVA_HOME in system variables list. (If you are not able to, try doing it again.)
- Select Path (from system variables list) and click on Edit button, A new pop will opens (Edit Environment Variables). It was introduced in windows 10.
- Click on New button and give %JAVA_HOME%\bin at highlighted field and click Ok button.
You can find complete tutorials on my blog :
How to set JAVA_HOME in 64 bit Windows 10 OS