Today am going to show you how to set java path system variable in Windows 10. You require the following for this article.
- Windows 10 Installed on your computer.
- JDK 11.0.1
Open Advanced System Settings in Windows 10.
At the bottom-left of your screen, Enter Advanced system settings and Click View Advanced system settings once the search window returns the result.
Click Environment Variables.
Once the popup window opens, Select Advanced then Environment Variables.
Add JAVA_HOME Variable and its path.
Down at the bottom in system variables click new. A pop-up window will appear with two text boxes one where you enter the variable name as “JAVA_HOME” then specify JDK path and click Okay.
Update Java Path.
Last and not the least thing to do is update Java Path.
Select Path in System variable, then click Edit and enter JDK path as shown below.
Testing if java is working.
There are two commands that you can use to test if Java path is set well in your computer,i.e is Java -version and Javac -version.
Microsoft Windows [Version 10.0.17134.407]
(c) 2018 Microsoft Corporation. All rights reserved.
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
Don’t forget to share. Read More Java Tutorials.