Thanks in Advance. - JAVA_HOME: must point to installation directory of JDK. - JRE_HOME: must point to installation directory of JRE. - CLASSPATH: contains libraries path which JVM will look for.
If you are not using software that requires them, you do not need to set JAVA_HOME and JRE_HOME. CLASSPATH is an environment variable which contains a list of directories and / or JAR files, which Java will look through when it searches for Java classes to load.
If you're doing any sort of development, or building with Maven or Ant, you need to point to the JDK (Java Development Kit) where utilities such as javac (the Java Compiler) reside. Otherwise, you can point to the JRE (Java Runtime Environment). The JDK contains everything the JRE has and more.
To set JAVA_HOME, do the following: Right click My Computer and select Properties. On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.
I ran into this error while setting up my Tomcat and Java environmental path:
Neither the JAVA_HOME nor the JRE_HOME environmental variables is defined. At least one of the 2 environmental variables is needed to run this program.
In the user variables: I created JAVA_HOME variables and add C:\Program Files\Java\jdk1.8.0_25 to its path. and then did an edit of system variable PATH, added C:\Program Files\Java\jdk1.8.0_25; to the beginning of the its path. I also created JRE_HOME in user variable and added C:\Program Files\Java\jre1.8.0_25 to its path.
Is it necessary to create JRE_HOME and should I add the JRE path to the system variable also?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With