Solve the problem of starting Tomcat under Linux. Neither the JAVA

  

The original use of Tomcat in Linux does not use the newly created user created by the non-ROOT permission, but may encounter a situation in which to start under this user identity After the project, close the SSH tool, the project can not be accessed, so you need to switch to root to execute, but the following error will occur, resulting in the project can not be started! The error is as follows:
Neither the JAVA_HOME nor the JRE_HOME environment variable is definedAt least one of these environment variable is needed to run this program

The JAVA_HOME path is not found, the following changes need to be made:

Found to start The directory where the path is located:
cd bin/vi catalina.sh

Add the following information:
export JAVA_HOME=/home/gongzi/http/jdk1.6.0_26export JRE_HOME=/home/gongzi/http/jdk1. The 6.0_26/jre

file can start blank area, as shown below:


Try again, and you need to pay attention. If you are deploying Tomcat for the first time, you need to edit it. Bashrc This file, method:

Enter the root directory:
vi .bashrc

Add content:
set JAVA_HOME=/home/gongzi/http/jdk1.6.0_26export JAVA_HOMEset PATH=$ JAVA_HOME/bin: $PATHexport PATHset CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jarexport CLASSPATH

Be careful of your own installation path!

End.

Copyright © Windows knowledge All Rights Reserved