Results 1 to 5 of 5
I am trying to install JSP with my Apache server. I have the Apache server up and serving html pages. I want to be able to support some of the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-22-2002 #1Linux User
- Join Date
- Nov 2002
- Posts
- 420
Why is are my variables disappearing AND How to install JSP
I am trying to install JSP with my Apache server. I have the Apache server up and serving html pages. I want to be able to support some of the JSP pages I have writen.
To install JSP I have installed the Java JDK1.3.1_03 in the /usr/java/jdk1.3.1_03 directory. Then, I attemp to create a system variable, JAVA_HOME to contain the directory. Here is my command:
JAVA_HOME=/usr/java/jdk1.3.1_03 ; export JAVA_HOME
It seems to work, because when I type:
echo $JAVA_HOME
I get the directory path I entered.
Then, I add the directory path to the classpath(?) like so:
PATH=$JAVA_HOME/bin:$PATH ; export PATH
When I echo $PATH I get what the correct new path and the javac command works. So the jdk is set up now, yea. By the way, I do all of this from the terminal as superuser in Xwindows on Mandrake 8.1 (vitamin), I believe it is a BASH shell.
I then, do the same thing for TOMCAT_HOME, and ANT_HOME. The problem arrises when I shutdown the computer for any reason. When I restart the computer the PATH is back to default, no more JAVA_HOME or anything. How do I get the PATH to stay set after I have restarted the computer. By the way, I use this command to shutdown the computer:
shutdown -h now
I have read that this is the way to do it without messing stuff up. please let me know if I am wrong.
Thanks in advance. Plus, I you know where I can find detailed instructions on how to install JSP, I would appreciate it.
- 11-22-2002 #2Just Joined!
- Join Date
- Jun 2002
- Location
- Lindenhurst, NY
- Posts
- 35
What you need to do is add the following lines to /etc/profile (for all users) or ~/.bash_profile (for individual users)
JAVA_HOME=/usr/java/jdk1.3.1_03
PATH=$JAVA_HOME/bin:$PATH
then add JAVA_HOME to the EXPORT line.
That should do it.
Tithefug
- 11-22-2002 #3Linux User
- Join Date
- Jul 2002
- Location
- Daytona Beach, FL
- Posts
- 487
(assuming you use bash)
cat /etc/passwd | grep `whoami`
the last part of this being your default login shell (bash by default under most distros I believe)majorwoo
Quiet brain, or I\'ll stab you with a Q-tip.
- 11-23-2002 #4Linux Enthusiast
- Join Date
- Jun 2002
- Location
- San Antonio
- Posts
- 621
Josh: what is that command supposed to do? He was looking for a way to make the JAVA_HOME/bin variable available to all users, yours does nothing like that, maybe a mispost? Either way, he needs to `export PATH=$PATH:$JAVA_HOME/bin` in one way or another at the beginning of a session. Joe's idea will work, but export is in lowercase.
I respectfully decline the invitation to join your delusion.
- 11-23-2002 #5Linux User
- Join Date
- Jul 2002
- Location
- Daytona Beach, FL
- Posts
- 487
yeah, the first part was missing
I said assuming you use bash,
(missing part)you can check for your default login shell by
/missing part)
majorwoo
Quiet brain, or I\'ll stab you with a Q-tip.


Reply With Quote
