LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-07-2003, 06:32 PM   #1
mbbender
LQ Newbie
 
Registered: Jul 2003
Location: NC
Posts: 17

Rep: Reputation: 0
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??
 
Old 07-07-2003, 07:10 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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
 
Old 07-07-2003, 07:56 PM   #3
mbbender
LQ Newbie
 
Registered: Jul 2003
Location: NC
Posts: 17

Original Poster
Rep: Reputation: 0
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).
 
Old 07-07-2003, 08:27 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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
 
Old 07-07-2003, 09:25 PM   #5
mbbender
LQ Newbie
 
Registered: Jul 2003
Location: NC
Posts: 17

Original Poster
Rep: Reputation: 0
The sdk solved the problem. Now onto configuration with apache...

Thanks for the help and quick response. Oh and thanks for reading the manuals!
 
Old 07-07-2003, 09:39 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Pleasure mate, anytime :}

Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
setting JAVA_HOME gauravbagga Linux - Newbie 2 03-04-2005 10:17 PM
JAVA_HOME Variable yea420 Linux - Software 6 08-29-2004 07:37 PM
TOMCAT init script not working on startup -- tomcat 4.x / Mandrake Linux 8.0 jmartinph Mandriva 0 03-08-2004 02:31 AM
PATH and JAVA_HOME peteABK Linux - Newbie 4 10-19-2003 05:30 PM
$JAVA_HOME and $PATH magnum818 Linux - Software 2 09-30-2003 11:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration