LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   linux environmental variable (https://www.linuxquestions.org/questions/linux-general-1/linux-environmental-variable-551910/)

surender 05-07-2007 05:21 AM

linux environmental variable
 
hi all
i am new to linux fedora core-5
i have installed jdk1.5.0_06 in /usr/java/ directory
and set the environment variable JAVA_HOME=/usr/java/jdk1.5.0_06
and PATH=/usr/java/jdk1.5.0_06/bin
but once i exit the shell the environmental variables also get fly away
on re-envoking the shell i am not able to compile java program
please help me

druuna 05-07-2007 05:27 AM

Hi,

You need to add these to your local environment file (~/.profile or ~/.bash_profile).

You can just add the following lines at the end of either of the 2 files:
export JAVA_HOME=/usr/java/jdk1.5.0_06
and
export PATH=$PATH:/usr/java/jdk1.5.0_06/bin

If you want everybody (global) to have access, add the lines to the bottom of /etc/profile.

Hope this helps.

XavierP 05-07-2007 07:54 AM

Moved: This thread is more suitable in Linux-General and has been moved accordingly to help your thread/question get the exposure it deserves.


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