Am trying to setup my tomcat server but when I execute the code \bin\startup I always get an error saying that jre is not correctly defined. My jre destination folder is c:\program files\Java\jre1.8.131. Please I need answers thanks.
Asked
Active
Viewed 28 times
2 Answers
0
By default it is set in catalina.sh or catalina.bat and it is set by system variables. I guess you are under windows environment.
JAVA_HOME Must point at your Java Development Kit installation.
Required to run the with the "debug" argument.
JRE_HOME Must point at your Java Runtime installation.
Defaults to JAVA_HOME if empty. If JRE_HOME and JAVA_HOME
are both set, JRE_HOME is used.
So you have three options.
- Set properly JAVA_HOME in your system - default way HOW TO
- Put the correct folder of your java into catalina.bat.
You can also create file setenv.bat where you will set it:
set JAVA_HOME=C:\Program Files\Java\jdk1.8.x
![](../../users/profiles/4327527.webp)
Milkmaid
- 1,569
- 3
- 22
- 36
0
Set the following user environment variables (== environment variables of type user variables)
JAVA_HOME : C:\Program Files\Java\jdk1.8.0_112
JDK_HOME : %JAVA_HOME%
JRE_HOME : %JAVA_HOME%\jre
CLASSPATH : .;%JAVA_HOME%\lib;%JAVA_HOME%\jre\lib
PATH : your-unique-entries;%JAVA_HOME%\bin
![](../../users/profiles/866021.webp)
Adil B
- 9,911
- 10
- 41
- 55
![](../../users/profiles/10361821.webp)
D Venkatesh
- 9
- 6