How to Set the JAVA_HOME or JRE_HOME Variable
To set the JRE_HOME or
JAVA_HOME variable. Locate your Java
installation directory. By default path will be
C:\Program Files\Java\jre1.8.0_221.
To change the environment variables
In Windows 7, Right
click My Computer and
select Properties -> Advanced
In Windows 8, Go
to Control Panel -> System -> Advanced System SettingsIn Windows 10, Search for Environment Variables then select Edit the system environment variables.
Under System Variables, click New.
In the Variable Name field, enter
either:
JAVA_HOME
if you
installed the JDK (Java Development Kit) or JRE_HOME
if you
installed the JRE (Java Runtime Environment).
In
the Variable Value field, enter your JDK or JRE
installation path :
JRE - C:\Program Files\Java\jre1.8.0_221
JDK - C:\Program Files\Java\jdk1.8.0_221
Click OK and Apply Changes as prompted.
Note : Windows 7 screenshots used
0 comments