MASIGNCLEAN104

How to set JAVA_HOME in Windows 10

iklan banner

In Unix terminology, an Environment variable is a string that holds data such every bit displace name, pathname, filename, etc. JAVA_HOME is an surroundings variable which addresses to the directory where Java Runtime Environment or Java Development Kit is installed inwards the system. To hold upward precise say if you lot convey installed Java inwards the path C:\Program Files\Java\jdk1.8.0_121 on your figurer in addition to then your Java_Home is C:\Program Files\Java\jdk1.8.0_121. Basically, JAVA_Home is precisely an exemplary used yesteryear Java-based programs similar Apache Tomcat in addition to other app server tools to discovery where Java is placed inwards the system.

These third-party programs brand purpose of the surroundings variables that request to the directory of JDK or JRE. In uncomplicated words, it makes slowly for the programs to locate the directory executable similar javac inwards the computer. If you lot are non using these 3rd political party programs, in addition to then it may non hold upward mandatory for users to laid JAVA_Home inwards your system. In this article, nosotros volition explicate inwards item how to laid JAVA_HOME every bit the surroundings variable inwards Windows 10.

Setting JAVA_HOME inwards Windows 10

Set JAVA_HOME surroundings variable & update the organization path

Download in addition to install Java from the official site – java.com.

After installation, Go to Start carte du jour in addition to type Advanced organization settings.

Click on View advanced organization settings from the listing to opened upward System Properties.

Go to Advanced tab in addition to click on Environment Variables button.

 an Environment variable is a string that holds data such every bit displace advert How to laid JAVA_HOME inwards Windows 10

In the Environment Variable window, click on New push nether the System variable.

In the Edit System Variable, laissez passer on the Variable advert every bit JAVA_HOME in addition to Variable value every bit the path to your JDK directory.

 an Environment variable is a string that holds data such every bit displace advert How to laid JAVA_HOME inwards Windows 10

Click on OK.

Now larn dorsum to the Environment Variable window in addition to select Path nether the System variable.

 an Environment variable is a string that holds data such every bit displace advert How to laid JAVA_HOME inwards Windows 10

Click on Edit push to opened upward Edit surroundings variable window.

 an Environment variable is a string that holds data such every bit displace advert How to laid JAVA_HOME inwards Windows 10

Click on New push in addition to type  %JAVA_HOME%\bin.

 an Environment variable is a string that holds data such every bit displace advert How to laid JAVA_HOME inwards Windows 10

Click OK to apply the changes.

Check JAVA_HOME configuration setup using CMD

To exam your configuration, opened upward Command prompt.

Type echo %JAVA_HOME% in addition to hitting Enter. This should impress the directory of the JDK which the JAVA_HOME is pointing. Instead, if you lot come across a space, it agency you lot convey failed inwards setting upward surroundings variable.

 an Environment variable is a string that holds data such every bit displace advert How to laid JAVA_HOME inwards Windows 10

Next Type javac -version which should impress the version of Java compiler.

 an Environment variable is a string that holds data such every bit displace advert How to laid JAVA_HOME inwards Windows 10

If non it volition impress a message that the javac is non recognized every bit an internal or external command. This agency the path variable is non laid correctly.

Hope this helps!


Source: https://www.thewindowsclub.com/
Share This :