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
2,271 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,140 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,920 points

Related Questions In Java

0 votes
0 answers

How to set the java_home path in Windows 10?

How to set the java_home path in ...READ MORE

Nov 3, 2023 in Java by Arya
• 990 points
319 views
0 votes
1 answer

How to run a Java program from the command line on Windows?

Hello @kartik, In case your Java class is ...READ MORE

answered Apr 9, 2020 in Java by Niroj
• 82,840 points
988 views
0 votes
2 answers

What is the syntax to initialize an array?

Rather than learning un-Official websites learn from ...READ MORE

answered Aug 2, 2018 in Java by samarth295
• 2,220 points
994 views
0 votes
1 answer

Is it possible to run a java program from command line on windows?How?

  Let's say your file is in C:\myprogram\ Run ...READ MORE

answered Apr 18, 2018 in Java by sophia
• 1,400 points
2,682 views
0 votes
2 answers

Java Environment Variables

--- To set java path --- There are ...READ MORE

answered Dec 3, 2018 in Java by Sushmita
• 6,920 points
1,451 views
+5 votes
4 answers

How to execute a python file with few arguments in java?

You can use Java Runtime.exec() to run python script, ...READ MORE

answered Mar 27, 2018 in Java by DragonLord999
• 8,450 points

edited Nov 7, 2018 by Omkar 81,223 views
+1 vote
1 answer

How to handle drop downs using Selenium WebDriver in Java

First, find an XPath which will return ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,500 points
8,359 views
0 votes
1 answer

What are the differences between getText() and getAttribute() functions in Selenium WebDriver?

See, both are used to retrieve something ...READ MORE

answered Apr 5, 2018 in Selenium by nsv999
• 5,500 points
17,433 views
0 votes
2 answers

What are all the different ways to create an object in Java?

There are different ways you could do this ...READ MORE

answered Aug 19, 2019 in Java by Sirajul
• 59,230 points
1,158 views
+1 vote
3 answers

What is the syntax to declare and initialize an array in java?

You can use this method: String[] strs = ...READ MORE

answered Jul 25, 2018 in Java by samarth295
• 2,220 points
3,579 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP