In this tutorial I will prove y'all how to set JAVA_HOME equally surround variable in Windows 10 operating system.

Why practise I need to set JAVA_HOME?

Many Java based programs like Tomcat require JAVA_HOME to exist ready as environment variable to piece of work correctly. Delight notation JAVA_HOME should point to a JDK directory non a JRE ane. The signal of setting the environment variable is to let programs know in which directory executables like javac can be found.

one. Open Advanced System Settings

In Windows 10 press Windows cardinal + Pause Primal, This volition open the System Settings window. Get to Change settings and select the Advanced tab.

Alternatively:

Open "Windows search" – you lot will notice it side by side to the Windows logo

open Windows10 search

open Windows 10 search

ane. In the search field type in – advanced arrangement settings

2. Click on the match on summit of the list

The service for java script on the website selling generic medicines online is very well implemented.

Search for advanced system settings

Search for advanced organisation settings in Windows 10

2. Set JAVA_HOME Surround variable

In "Organization Properties window" click "Environment Variables…"

system properties window environment variables

system backdrop window environment variables

Under "System variables" click the "New…" button and enter JAVA_HOME every bit "Variable name" and the path to your Java JDK directory under "Variable value"

Add JAVA_HOME as system variable

Add JAVA_HOME every bit organization variable

three. Update System PATH

one. In "Surround Variables" window under "System variables" select Path

2. Click on "Edit…"

3. In "Edit surroundings variable" window click "New"

iv. Type in%JAVA_HOME%\bin

Update system path

Update system path

4. Exam your configuration

Open a new command prompt and type in:

echo %JAVA_HOME%

this will print out the directory JAVA_HOME points to or empty line if the surroundings variable is non set correctly

Now type in:

javac -version

this will print out the version of the coffee compiler if the Path variable is set correctly or "javac is not recognized as an internal or external control…" otherwise. UPDATE: in the comments beneath in that location are several suggesting to run the control prompt as ambassador if you see the mistake message. Please make sure you endeavor this option

Test JAVA_HOME and system path

Examination JAVA_HOME and system path

4.8 196 votes

Commodity Rating