LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Install tomcat6.0.18 JAVA_HOME/JRE_HOME problem (https://www.linuxquestions.org/questions/linux-software-2/install-tomcat6-0-18-java_home-jre_home-problem-682461/)

gogoabc 11-10-2008 04:12 PM

Install tomcat6.0.18 JAVA_HOME/JRE_HOME problem
 
Firstly, I installed java-6-sun
then I downloaded tomcat6.0.18
then I set JAVA_HOME with every method(in ./.bashrc, /etc/profile, etc) I can find online.
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun/
Also, I have the result:

tai@avaceratops:~$ echo $JRE_HOME
/usr/lib/jvm/java-6-sun/jre

however, when I try to start tomcat, I got:
tai@ubuntu:/$ sudo /usr/local/tomcat/bin/startup.sh
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr

it's weird, it should be Using JRE_HOME: /usr/lib/jvm/java-6-sun/jre in my last line based on the value of my JRE_HOME
can anyone give me any hint? thank you!

vladmihaisima 11-11-2008 09:02 AM

Did you set JAVA/JRE_HOME as root ? You are doing "sudo /usr/local/tomcat/bin/startup.sh", so startup.sh will not use your environment.

You should try "sudo -E /usr/local/tomcat/bin/startup.sh". (and read sudo man page ;)

gogoabc 11-13-2008 02:32 PM

Quote:

Originally Posted by vladmihaisima (Post 3338322)
Did you set JAVA/JRE_HOME as root ? You are doing "sudo /usr/local/tomcat/bin/startup.sh", so startup.sh will not use your environment.

You should try "sudo -E /usr/local/tomcat/bin/startup.sh". (and read sudo man page ;)

Thank you, I used sudo -E and the output of JRE is right this time. However, Tomcat won't start.

Finally, I used tomcat5.5 and it works.


All times are GMT -5. The time now is 05:53 PM.