What are the steps to set Java home on Windows

+4 votes
I am a beginner in Java. And I am not able to set the path for JAVA_HOME. Please help!
Apr 12, 2018 in Java by sophia
• 1,400 points
1,895 views

3 answers to this question.

0 votes

To set java_home on windows follow the below steps:

  1. Right-click the My Computer icon and select Properties.

  2. Now click the Advanced tab, then click the Environment Variables button.

  3. Then under System Variables, click New.

  4. Now enter the variable name as JAVA_HOME.

  5. Enter the variable value as the installation path for the Java Development Kit.

  6. Click OK.

  7. Click Apply Changes

answered Apr 12, 2018 by Daisy
• 8,120 points
0 votes

In cmd:

set JAVA_HOME="C:\\....\java\jdk1.x.y_zz"

echo %JAVA_HOME%

set PATH=%PATH%;%JAVA_HOME%\bin

echo %PATH%
answered Jul 31, 2018 by samarth295
• 2,220 points
0 votes
Set Java Home

JAVA_HOME = C:\Program Files\Java\jdk1.7.0 [Location of your JDK Installation Directory]

Once you have the JDK installation path:

- Right-click the My Computer icon on
- Select Properties.
- Click the Advanced system setting tab on left side of your screen
- Advance Popup is open.
- Click on Environment Variables button.
answered Sep 18, 2018 by Sushmita
• 6,910 points