How to Set Java PATH in Windows 10
Java is one of the most used programming languages out there, you might be also using it for developing custom software or applications. When you install java on your computer for the first time, one of the very first things you should do is adding its path to the Windows 10 system variables. This will…

Set Java PATH in Windows 10
Java is one of the most used programming languages out there, you might be also using it for developing custom software or applications. When you install java on your computer for the first time, one of the very first things you should do is adding its path to the Windows 10 system variables. This will ensure that Windows can execute Java files in order to run your programs. Without it being added to the system variables, Windows will not be able to any of your files written in Java.
By default, while installing Java on your computer, if you are using one of the recent versions of Java, the system variable will be automatically set. However, for some reason, if you are using an older installation or the installer wasn’t able to add the path to your Java installation to the system variables, you will have to manually do that. That’s what we are going to discuss today.
What is the Java Path?
In most cases, on a regular Java installation the path you should add to the system variables is as follows.
C:\Program Files\Java\jdk1.8.0_31\bin
Keep in mind that the “1.8.0_31” will change based on the current version of the JDK you have installed.
Even though just adding the above path to the Windows 10 system variables would work just fine, it is recommended to add one more path as follows.
Variable Name : JAVA_HOME
Variable Value : C:\Program Files\Java\jdk1.8.0_31
and then add the following to the PATH variable.
%JAVA_HOME%\bin
The difference is that we added an extra variable “JAVA_HOME” and used that as a reference to the actual variable that we add to the path variable.
Steps to Set Java PATH in Windows 10
- Search System in the Windows 10 search bar.
- Click on the System option that pops up.
- On the right side of the newly opened screen, click on Advanced system settings.
- Click on the Environment Variables button at the bottom.
- In the System variables section, look for the PATH variable.
- Click on it and select Edit.
- In the Edit Environment Variables screen, click on the New button to add a new path.
- Then input the Java path inside the box and click OK.
- Restart your computer.
That’s it, you have successfully added the Java path to your Windows 10 PC. As soon as you restart the computer, Windows will start recognizing the newly added path and will be able to execute code with Java. Happy Java programming.
You might also like

How to Add Python Path to Windows 10
Python doesn’t need any introduction. Being one of the most used programming languages in the world, Python is working on almost all of our devices in one way or another. When you want to start programming in Python, it is necessary to make sure that it is currently installed and ready to run Python scripts.…

How to Access Windows 10 Startup Folder?
Windows is a convenient operating system; you can access to any file or folder without running commands. Are you want to open Windows 10 Startup folder? Searching start menu for the folder? The startup folder option is removed from Windows operating system from Windows 8 version.

How to Update Java on Windows 10
Being one of the widely used programming languages, Java has a lot to offer for several purposes including software and app development. It is not surprising that you are also a Java programmer. But, just like any other programs or applications out there, Java also need frequent updates in order to ensure compatibility with other…
The week in tech, minus the noise.
New reviews, fixes and the stories that matter — once a week, straight to your inbox.
We only use your email to send the newsletter. Unsubscribe any time. See our privacy policy.
Comments