-bash-3.00$ vi /etc/profile.d/java.sh
# set java home enviroment variable
JAVA_HOME=/usr/java/jre1.5.0_06/bin
export JAVA_HOME

You might have to have java in your path, that can be done with
export PATH=$PATH:$JAVA_HOME (in the same profile)

Where "/usr/java/jre1.5.0_06/bin" is the path where java is installed on
your box.

Daniel

uhm...JAVA_HOME is not set on my distro....but in more cases is not required.....
But when I found the error I tried to set it....in effect I exported the following path:

export JAVA_HOME="/usr/java/jre1.4.2"

....I thought that was right....I don't exported bin...

Ok....now in the (my) Afternoon I try to set as you say me....

regards
Alex