I know this is very simple things to do and specially if you are an expert developer 🙂 . But it will be better if we have all the steps in a single place. So here is the step by step guideline to set JAVA_HOME path in Windows 7 / Windows 8 / Windows 10.

  1. Know your Java installation Directory and Copy the JDK installation directory path.

If you didn’t change the default path during java installation then it’ll be C:\Program Files\Java\jdk1.8.0_111

copy-java-installation-path

       2. Follow the below step on the basis of your operating system

  • Windows 7 : Right click My Computer icon -> Select “Properties” > Advanced [Jump to Step 3]
  • Windows 8 : Go to Control Panel > System > Advanced System Settings [Jump to Step 3]
  • Windows 10 : Go to control Panel -> System and Security -> System -> Advanced System Settings

    Here is the complete step guideline for windows 10

  2.1) Go to control panel -> System and Security

      go-to-control-panel

            2.2) Click on System

select-system-in-control-panel

3. Click on Advanced system settings and Environment Variables.. as shown in below image.

( For Windows 7 user: After click on “Advanced” , System Properties window will be prompt. Rest all step will be same for Windows 7 , Windows 8 and Windows 10)

system-advance-system-settings

4. Under System Variables , Click New.

system-new-system-variable

5. Add new JAVA_HOME System Variable .

Variable Name: JAVA_HOME
Variable Value: C:\Program Files\Java\jdk1.8.0_111

add-new-systemvariable-java_home

6. Append JAVA_HOME variable in Path variable.

Select Path variable under Environment Variables , click on Edit button. Append %JAVA_HOME%\bin in Path variable value, click Ok to apply the changes.

append-java_home-path

7. Verify :

Open command prompt and check java -version. If you correctly configured then it will display the Java version on command prompt. (If command prompt is already opened then close it and open it again to load the new environment variable)

set-env-9

(Visited 552 times, 32 visits today)