How To Set or Change Java Environment Variables In Windows 10?

Java is a popular programming language where a lot of applications are developed and used in Windows 10. Java requires binaries like java and javac in order to complete and run Java applications in Windows 10. In order to run these java and javac command and run related applications, the required Java environment variables should be set properly.

Java Environment Variables

There are different Java environment variables but the most basic one is the PATH environment variable. Actually, the PATH environment variable is the default Windows variable which is used in a lot of different windows applications in order to call their executables via the MS-DOS or PowerShell command-line interface. The Java installation directory can be added to the Windows 10 environment variables with the following values.

Variable Name : PATH 
Variable Value : C:\Program Files\Java\jdk1.8.0_31\bin

Another Java environment variable is JAVA_HOME . JAVA_HOME is used by the java related applications in order to find the Java tools and libraries and use them properly.

Variable Name : JAVA_HOME
Variable Value : C:\Program Files\Java\jdk1.8.0_31

Alternatively the PATH variable can be set like below after settings the JAVA_HOME which is described in the previous step.

Variable Name : PATH 
Variable Value : %JAVA_HOME%\bin

Set Java Environment Variables In Windows 10

In order to set Java Environment variables in Windows 10 first, we click on the Start Menu and type environment like below to open it.

In the System Properties screen click to the Environment Variables like below.

Open Environment Variables

The JAVA_PATH variable can be created by creating a new variable under the System Variables. Just click to the New button like below.

Create New System Variable

In the New System Variable screen set the Variable Name as JAVA_HOME and value the Java installation path according to your situation.

Set JAVA_HOME Environment Variable
See also  Keyboard Shortcut For Print Screen Without PrintScreen Button

Leave a Comment