LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-22-2005, 01:25 AM   #1
Niceman2005
Member
 
Registered: Nov 2004
Distribution: Fedora Core 2
Posts: 330

Rep: Reputation: 30
# ./startup.sh Neither the JAVA_HOME nor the JRE_HOME environment variable is defined


Dear friends,


I am trying to install jakarta-tomcat. Following its instruction, it says "Set and environment variable named JAVA_HOME to the oathnames of the directory into which you installed the JRE, e.g. /usr/local/java/j2sdk5.0"

I don't quite understand this instruction,

I have my java folder in /var/www/html/j2r e1.4.2_08

What is the need of environement variable actually?

Apparently because I didn't do that step, so when I tried to startup the jakarta-tomcat, it gives me the following response:

]# ./startup.sh
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program


Can anyone help me with this? thanks for taking time reading my mail!
 
Old 06-22-2005, 02:02 AM   #2
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 61
1) Why have you installed Java to /var/www/html ?? It is much better to install programs to /usr/local. /var/www is to do with Apache, AKAIK. I suggest that you move Java to /usr/local.

2) It looks like you have got the JRE. So you will need to set the environment variable JRE_HOME. To do this, open ~/.bash_profile in your favourite text editor. Add the line
Code:
 export JRE_HOME=/usr/local/j2re1.4.2_08
Save the file, and then run the command (in an Xterm)
Code:
 source ~/.bash_profile
I hope this helps
--Ian
 
Old 06-22-2005, 02:27 AM   #3
Niceman2005
Member
 
Registered: Nov 2004
Distribution: Fedora Core 2
Posts: 330

Original Poster
Rep: Reputation: 30
Gidday Mr IBall,

I moved the jre to /usr/local/
I tried the commands. It works now.

Thank you very very much for your help!
 
Old 06-29-2005, 01:58 PM   #4
d1l2w3
Member
 
Registered: May 2004
Location: Amboy WA USA
Distribution: Mandriva 2007
Posts: 366

Rep: Reputation: 30
I have the same problem except I used /usr/local/java.
Then added:
export JAVA_HOME=/usr/local/java to ~/.bash_profile.

I did the above and this is the result of source ~/.bash_profile.
bash; TMOUT: readonly varible.

Any ideas on how to solve this?

dlw
 
  


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
diff between #define and const defined variable b123coder Programming 7 06-27-2005 08:02 AM
environment variable gamor Linux - Newbie 4 04-30-2005 05:28 PM
JAVA_HOME Variable yea420 Linux - Software 6 08-29-2004 06:37 PM
Environment Variable salmanucit Linux - Software 2 07-21-2004 02:27 AM
Opera Startup + Setting JAVA_HOME l2g Linux - Newbie 2 03-07-2004 05:43 AM


All times are GMT -5. The time now is 07:21 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration