LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   $PATH keeps changing? (https://www.linuxquestions.org/questions/linux-software-2/%24path-keeps-changing-168859/)

linux_dejan 04-11-2004 03:30 PM

$PATH keeps changing?
 
I just installed java sdk and now i need to make it possible to call java, javac and all those commands directly by just writing them in xterm no matter in what directory you are in...

Well, i started out by editing the $PATH by adding /usr/local/j2sdk1.4.2_04/bin/ like so:

export PATH=$PATH:/usr/local/j2sdk1.4.2_04/bin/

And it works!..... UNTILL i close xterm and start a new one or jump out of root to my user account??

Why is $PATH not keeping the value i give it??

Thx!

acid_kewpie 04-11-2004 03:32 PM

beacuse it has no where to be kept. you need to set it in a config file. e.g /etc/profile, ~/.bashrc or another similar one. each of these files will be executed each time to log in, i.e open a shell window or similar. alternatively add it to a system wide run once file, like /etc/rc.local if your distro supports it.


All times are GMT -5. The time now is 01:16 AM.