A quick way to rule out any typos in your environment variable is to use either the cd or ls command:
If neither of those work, you know you've got it wrong.
Also, unless you're trying to run more than one instance of Tomcat from the same codebase, there is no need to explicitly set the CATALINA_HOME environment variable. You only need to set JAVA_HOME or JRE_HOME. startup.sh will set the CATALINA_HOME variable for you.
Now, I thought it was a permissions things so inside the bin directory, I conducted a chmod + x *.sh:
When I try to run Tomcat, this is what I get:
Contents of startup.sh:
Contents of setclasspath.sh:
I am getting the BASEDIR problem in both OS X Tiger and Ubuntu 7.0.4...
When I googled, this problem, it seems as if a bunch of people were experiencing this but there was no solutions?!
See the search results (from Google) fficial&client=firefox-a" target="_blank" rel="nofollow">here.
This is really frustrating!
In the past five years, I've never experienced a problem that seems so simple to solve but something that just comes out of the box (when one downloads and unzips Tomcat from http://tomcat.apache.org)!?
What does the following command print on the console?
SCJP2, BEA WLS 6.0, DB2 UDB 7.1
Joined: Nov 12, 2001
I actually got it working...
What it was is that after you set the system environmental variable, you are supposed to start tomcat by manually issuing the entire path, instead of issuing it from $CATALINA_HOME.
So, for example, if $CATALINA_HOME is set to /usr/local/tomcat/
instead of trying to run it from the command line by issuing:
One should do it manually:
cd /usr/local/tomcat /usr/local/tomcat $ sh startup.sh
And wa la! You'll see:
Using CATALINA_BASE: /usr/local/tomcat/ Using CATALINA_HOME: /usr/local/tomcat/ Using CATALINA_TMPDIR: /usr/local/tomcat/ Using JRE_HOME: /System/Library/frameworks/JavaVM.framework/Versions/1.5.0/Home