set java path system variable

How to set java path system variable in Windows 10

Today am going to show you how to set java path system variable in Windows 10. You require the following for this article.

  1. Windows 10 Installed on your computer.
  2. 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.

Advanced system settings

Click Environment Variables.

Once the popup window opens, Select Advanced then Environment Variables.

Java Environment Variables
Set Java 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.

Adding JAVA_HOME and JDK path

Update Java Path.

Last and not the least thing to do is update Java Path.

adding java path

Select Path in System variable, then click Edit and enter JDK path as shown below.

Enter JDK Path in windows 10

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.

Example.

Output.

Testing Java path in windows 10

Don’t forget to share. Read More Java Tutorials.

About the Author: Eric K

Kenyan Developer and Blogger with Interests in Java,Javascript,Node.js, Wordpress, Android, PHP and Making Money Online. Solving world problems through programming is my passion. Hire me: Email : kawi3462@gmail.com