Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Neither the JAVA_HOME nor the JRE_HOME environment variable is defined - Tomcat  (Read 35074 times)

0 Members and 1 Guest are viewing this topic.

sajugovind

  • Guest
If you get this error when logged in as the user (it will show up for the user but not if you su as their user)

Code: [Select]
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program

Login as the user via SSH

Navigate to /home/user/tomcat/bin

Open startup.sh and shutdown.sh and add the following lines to the top:

export JAVA_HOME=/usr/local/java
export JRE_HOME=/usr/local/jdk

Then tomcat should start/stop just fine as them.