Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

Tomcat 5 Install - JAVA_HOME environment variable is not defined correctly

Paul Pearce

2007-03-03

Replies:

Hi,



I recently installed Tomcat 5 following these excellent instructions using
the exact same versions that are referenced in the instructions:

http://www.meritonlinesystems.com/docs/apache_tomcat_redhat.html



When I run the install command I get:



root@(protected)



The JAVA_HOME environment variable is not defined correctly This environment
variable is needed to run this program

NB: JAVA_HOME should point to a JDK not a JRE





From the instructions I did the following:

**************************

Set the JAVA_HOME environment variable, by modifying /etc/profile so it
includes the following:

JAVA_HOME="/usr/java/j2sdk1.4.2"
export JAVA_HOME

/etc/profile is run at startup and when a user logs into the system, so you
will need to log out and log back in for JAVA_HOME to be defined.

exit
su -



However, when I check the



root@(protected)

/usr/local/jdk

root@(protected) [~]#



*******************************



it appears that "JAVA_HOME" still points to the wrong directory.



I have repeatedly tried to reset the JAVA_HOME variable and searched for a
solution on Google & MARC but I am hitting a wall.



-- From the root level the Java (j2sdk1.4.2) is installed in the /usr/java
directory

/usr/local/jdk



-- Tomcat is installed in the /usr/local/jakarta-tomcat directory.



OS: CentOS





I am installing this on a Virtual Private Server (VPS) at a hosted facility.




Any tips/suggestions would be greatly appreciated.



Paul



















©2008 junlu.com - Jax Systems, LLC, U.S.A.