How to set JAVA_HOME in REDHAT 9.0 Linux?
I was trying to set JAVA_HOME in profile file, but unable to decide where to put the java_home path. Can anyone guide me?
J2sdk and JRE are in /USR/JAVA |
tejpatil,
As root, put it in /etc/profile. Regards, Bamse |
Quote:
Regards, Bamse |
Hi,
I did that, but I cannot execute java command from root. profile file changes: #################################################### #JAVA_HOME JAVA_HOME=/usr/java/j2sdk1.5.0 ################################################### export JAVA_HOME --------------------------------------------- I did check the profile attributes it look like this: -rw-r--r-- 1 root root 1009 May 22 23:46 profile Is this correct. |
If you want to execute commands in $JAVA_HOME/bin, you'll need to add it to your PATH as well, e.g.:
export PATH=$PATH:$JAVA_HOME/bin You can also just type the full path name of the command. |
Thanks. It worked.
|
All times are GMT -5. The time now is 06:48 PM. |