LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   setting java environment varibale (https://www.linuxquestions.org/questions/linux-newbie-8/setting-java-environment-varibale-4175443750/)

shankarpanda003 01-01-2013 10:46 PM

setting java environment varibale
 
Hello,
i have installed the java1.6 package what red hat linux is providing.But i am not able to set the JAVA_HOME environment variable.Can anyone please guide me how to do it.

shivaa 01-01-2013 10:59 PM

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


All times are GMT -5. The time now is 10:57 AM.