LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   # ./startup.sh Neither the JAVA_HOME nor the JRE_HOME environment variable is defined (https://www.linuxquestions.org/questions/linux-newbie-8/startup-sh-neither-the-java_home-nor-the-jre_home-environment-variable-is-defined-335996/)

Niceman2005 06-22-2005 01:25 AM

# ./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!

IBall 06-22-2005 02:02 AM

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

Niceman2005 06-22-2005 02:27 AM

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!

d1l2w3 06-29-2005 01:58 PM

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


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