It can be set as:-
For bash shell:
Code:
JAVE_HOME=/path/to/java_dir; export JAVA_HOME
Or you can use,
Code:
export JAVA_HOME=/path/to/java_dir
And to make it permanant, add the same line at the end of your
.bash_profile file.
For csh/tcsh shell:
Code:
setenv PATH /path/to/java:$PATH