• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

SoftwareTestingo - Interview Questions, Tutorial & Test Cases Template Examples

SoftwareTestingo - Interview Questions, Tutorial & Test Cases Template Examples

  • Home
  • Test Case Examples
  • Interview Questions
  • Interview Questions Asked
  • Java
  • Java Program
  • Selenium
  • Selenium Programs
  • Manual Testing
  • Difference
  • Tools
  • SQL
  • Contact Us
  • Search
SoftwareTestingo » Java » Java Tutorial » How to Set Java_Home Variable On Windows 10 Step By Step?

How to Set Java_Home Variable On Windows 10 Step By Step?

Last Updated on: August 11, 2020 By Softwaretestingo Editorial Board

What We Are Learn On This Post

  • Prerequisites For Set Java_Home
  • For Verify Java Version:

Set Java_Home Variable On Windows 10: This post we are trying to share, how to set the JAVA_HOME variable on windows 10. If you are facing difficulties in install Java on Windows 10, then you can refer to this article.

Prerequisites For Set Java_Home

  • Java Should Be Installed, and If on your system Java is not installed then you can follow this post for java 64-bit installation in windows 10 machine.
  • Windows Should Installed in You System

If on your system, Java is not installed then, Follow the below Step To Configure the Java_Home so that we can run java command anywhere in our system.

  • First, we need to search advanced system settings in the search box and click on View Advanced System Settings

    Advanced System Settings
    Advanced System Settings
  • After clicking on view Advanced system settings, you will get a window System properties.

    Advance System Settings
    Advance System Settings

In System variables, add a new JAVA_HOME by clicking on New and after that enter the Variable Name as JAVA_HOME and Variable Name as C:\Program Files\Java\jdk1.8.0_92 to point into the JDK installation folder.

System Variable
System Variable

Note:

1. Correct : C:\Program Files\Java\jdk1.8.0_92
2. Wrong: C:\Program Files\Java\jdk1.8.0_92\bin

  • After setting the JAVA_HOME in the system variable, you need to set the path in the Path variable. So for an update, the path variable clicks on the path variable after the click on edit. After Click on the edit button, you will get another new window “Edit Environment Variable”, and there you need to update the path details with \bin so that the complete path will look like this.
    %JAVA_HOME%\bin
Check Also: HR Interview Questions

Verify Java Installed:

to verify whether java installed in your system, you need an open command prompt and try below commands

For Verify Java Version:

open the command prompt and enter java -version

C:\Users\******>java -version
java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)

C:\Users\****>javac -version
javac 1.8.0_92

for find out the java installation directory, details try below command

C:\Users\*****>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.8.0_92

    How do I set my Java_home?
    We can set the Java_home by goto the environmental variables of windows machine and mentioning the Java installation directory.

    What is Java_home path?
    Environment variables are strings that contain information such as drive, path, or file name. The JAVA_HOME environment variable points to the directory where the Java runtime environment (JRE) is installed on your computer.

    Why should I set Java_home?
    By setting the environment variable JAVA_HOME you specify where the JRE, and hence all those runtime resources, are to be found. You should ensure that the particular Java you execute matches the setting of JAVA_HOME.

Filed Under: Java Tutorial

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Join SoftwareTestingo Telegram Group

Categories

Copyright © 2023 SoftwareTestingo.com ~ Contact Us ~ Sitemap ~ Privacy Policy ~ Testing Careers