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.
Check Also: File Not Found Exception In Java
- First, we need to search advanced system settings in the search box and click on View Advanced System Settings
- After clicking on view Advanced system settings, you will get a window System properties.
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.
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.
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