Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I installed Java and now added Tomcat. I configured Tomcat, but it is not running.

What I did was add the line:

export JAVA_HOME=/usr/lib/jvm/java-6-sun

as the first non-comment line in the /home/myuser directory. And then I went to the /opt/tomcat/bin directory and ran this command:


and it said command was not found. Any reason for that? I see the script right in that directory when I do an ls command. I use Ubuntu by the way.

Thanks, Alex

share|improve this question
Can you post the tomcat log or copy/paste the startup output? It might not be startup,sh that can't be found but maybe the path to your shell in the first line in the script is bad? – mahnsc Apr 5 '11 at 2:41
try . ./ ? – JoseK Apr 5 '11 at 6:48

1 Answer 1

up vote 2 down vote accepted

The first thing I would do is type echo $JAVA_HOME as the user that is starting tomcat. Second, it seems you are using the JVM, you need to use the JDK instead. Tomcat needs the tools in the JDK to run properly. actually calls which resides in the same directory. I've always added the variables that tomcat needs at the top of this file to make sure that it is always loaded with the java instance it needs for your app and that can't be accidentally changed by someone.

If you look at the top of it has all the variables you can set. The ones you would be most interested in are:

#   JAVA_HOME       Must point at your Java Development Kit installation.
#                   Required to run the with the "debug" or "javac" argument.
#   JRE_HOME        Must point at your Java Development Kit installation.
#                   Defaults to JAVA_HOME if empty.
share|improve this answer
Thank you that worked :) – Genadinik Apr 5 '11 at 17:33
@Zypher, This contradicts . Only JRE is needed unless you use catalina debug. Tomcat 5.5 and above has eclipse compiler inside it. – Pacerier Sep 18 at 9:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.