http://forums.techguy.org/t134418/s.html
This can probably solve your problem, but was aimed at installing the JDK.
--OR This is similar but also for the JDK not JRE--
It is simply a matter of your path. You should add it to your PATH in:
$HOME/.bash_profile
$HOME is your home directory in *nix - /home/<username> on RedHat. Also
the environmental variable $HOME is set when you log in and ~ is a
shortcut for it. The . in front of .bash_profile hides the file - this
is the file the login process runs when you log in (after the
system-wide /etc/profile - you could change this alternately, but you
must do this as root).
*nix uses : to seperate paths and you must export the variable for it to
be visible outside the shell script. So your change should be something
like:
It is simply a matter of your path. You should add it to your PATH in:
$HOME/.bash_profile
$HOME is your home directory in *nix - /home/<username> on RedHat. Also
the environmental variable $HOME is set when you log in and ~ is a
shortcut for it. The . in front of .bash_profile hides the file - this
is the file the login process runs when you log in (after the
system-wide /etc/profile - you could change this alternately, but you
must do this as root).
*nix uses : to seperate paths and you must export the variable for it to
be visible outside the shell script. So your change should be something
like:
JDK_HOME=/usr/java/jdk-1.4.1_02
JAVA_HOME=$JDK_HOME
#append jdk path to already existing path adjustment
#PATH=$PATH:~/bin <-- old line
PATH=$PATH:~/bin:$JDK_HOME/bin
#export JDK_HOME and JAVA_HOME - a number of tools require these values
#export PATH <-- old line
#export PATH JAVA_HOME JDK_HOME
JAVA_HOME=$JDK_HOME
#append jdk path to already existing path adjustment
#PATH=$PATH:~/bin <-- old line
PATH=$PATH:~/bin:$JDK_HOME/bin
#export JDK_HOME and JAVA_HOME - a number of tools require these values
#export PATH <-- old line
#export PATH JAVA_HOME JDK_HOME