PATH variable
so I'm adding my java/bin directory to my PATH variable and I'm using the PATH=$PATH:/bla/bla/bla and I hit enter. I then try using the javac command to compile a program and everything is Kosher. However, as soon as I logout, or leave the console, the PATH variable reverts back to what it was before I added /bla/bla/bla.
I'm running free mandrake 2006 right now. Anyone have any ideas? Thanks ahead of time, suavecu |
First hit on Google:
http://www.troubleshooters.com/linux/prepostpath.htm Summary (from my feeble memory--not the site) You need to export PATH to make it stick You need to put it in a config file to be there on re-boot |
I put my custom PATH variable in my .bashrc. The line looks like
Code:
export PATH="<whatever I want here>" |
Quote:
Code:
export PATH=$PATH:/path/to/directory I hope this helps --Ian |
Quote:
This is driving me crazy. Anyone have any ideas? Thanks again. |
Quote:
|
so it's this part that I am missing
Quote:
|
Quote:
|
K, I had to put it in my /etc/profile file because the /etc/bashrc file said that all environment variables belonged in profile. That being said, I added the JAVA_HOME variable and then added the line export PATH=$JAVA_HOME/bin:$PATH and it worked.
Thank you everyone very much, as always it's greatly appreciated. random question: as you can see I'm still a linux/linux lingo noob :) so why do people put .'s around a file name (like .bashrc.) Thanks again. |
.<filename> makes that file hidden in *nix/linux.
|
Thank you for explaining that :) On a much less positive note, I logged back in, and it still doesn't work even though the .profile file has the path variables in it. So now I'm completely out of ideas :( I checked .profile and everything is still in there, only now it doesn't work. All I want to do is write some java code :(
Where would I enter it in the .bashrc file? There is nothing like it in that file, so I don't want to add something to somewhere where it shouldn't be. |
LOL, had to reboot for the settings to take effect, duh. It works now, thank you everyone for your help.
|
All times are GMT -5. The time now is 07:29 PM. |