LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to set JAVA_HOME in REDHAT 9.0 Linux? (https://www.linuxquestions.org/questions/linux-general-1/how-to-set-java_home-in-redhat-9-0-linux-184720/)

tejpatil 05-23-2004 02:05 AM

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

hw-tph 05-23-2004 06:32 AM

Try editing your ~/.bashrc and add it there:
Code:

export JAVA_HOME=/usr/java
...then make sure ~/.bashrc is called from ~/.bash_profile:
Code:

if [ -e ~/.bashrc ]
then
    source ~/.bashrc
fi

You may also want to keep in mind that filenames and directories in Linux are case sensitive, so setting $JAVA_HOME to /USR/JAVA would fail.

Håkan


All times are GMT -5. The time now is 11:21 PM.