Let's say u install ur java sdk "j2sdk1.4.2_04" under /usr/local.
The full path to ur java will be: /usr/local/j2sdk1.4.2_04
Now to change it, just type:
"vi $HOME/.bash_profile"
Now u see something like this in ur .bash_profile:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin:/usr/local/j2sdk1.4.2_04/bin/
BASH_ENV=$HOME/.bashrc
USERNAME="root"
CVS_ROOT=/home/cvs
export USERNAME BASH_ENV PATH CVS_ROOT
I added the java path at the end of the line "PATH" as u can see above. Then logout and login again to ur account. Congratulations
[/quote]