JAVA_HOME and tomcat
I'm running red hat 9, j2re1.4.1_03, tomcat 4.1..24 (well tring to)
Everything seems to be set just fine. But when I try: $CATALINA_HOME/bin/startup.sh I get the error: The JAVA_HOME environment variable is not defined correctly This environment variable is needed to run this program I defined JAVA_HOME every where I could I think of. I have it defined as export JAVA_HOME=/usr/java/j2re1.4.1_03 in /etc/profile.d/java.sh /etc/profile /home/michael/.bash_profile when I try (from both a user and root): echo $JAVA_HOME I get /usr/java/j2re1.4.1_03/ I don't see why it says it is not defined correctly. Any ideas?? |
Two things:
1.) Look at the startup.sh and check how it tests for the java_home. 2.) My echo $JAVA_HOME doesn't produce a trailing backslash, not that I'd think it should matter, though... Cheers, Tink |
I did some searching to find where exactly this error is occuring. When the startup.sh calls the setclasspath.sh for java the error is coming from
if [ ! -r "$JAVA_HOME"/bin/java -o ! -r "$JAVA_HOME"/bin/jdb -o ! -r "$JAVA_HOME/bin/javac ]; then echo "The JAVA_HOME environment variable is not defined correctly" echo "This environment variable is needed to run this program" exit 1 I don't know if maybe its an outdated version or what exactly that code does. I do not understand what the -r and -o are doing in that code. I went to those directories. $JAVA_HOME/bin/jdb and $JAVA_HOME/bin/javac were not installed with my java. I'm assuming thats because I just istalled the jre instead of the sdk. Also -o is not a known option for $JAVA_HOME/bin/java ( I do not know if it is suppose to be or not according to the code). |
In this case it's not meant to be
a parameter ... it's the OR in bash. In other words, that thing checks for read-permissions of those three executables, and fails if you don't have read-rights for either of them. Which means that your assumption that you need the jdk rather than the jre is very likely to be right :} Cheers, Tink |
The sdk solved the problem. Now onto configuration with apache...
Thanks for the help and quick response. Oh and thanks for reading the manuals! |
Pleasure mate, anytime :}
Cheers, Tink |
All times are GMT -5. The time now is 09:26 PM. |