0

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.

Owen A
  • 1
  • 2

2 Answers2

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.

  1. Set properly JAVA_HOME in your system - default way HOW TO
  2. Put the correct folder of your java into catalina.bat.
  3. You can also create file setenv.bat where you will set it:

    set JAVA_HOME=C:\Program Files\Java\jdk1.8.x

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
Adil B
  • 9,911
  • 10
  • 41
  • 55