1
I've been trying back and forth to set environment variables in the Terminal.app but it won't take any effect.
Here's the scenario: With the Terminal open I write
pico .profile
Then in the editor I enter
export JAVA_HOME="Library/Java/Home"
export PATH=$JAVA_HOME/bin:$PATH
Then I press ctrl+x
to exit and y
to save. I exit the terminal and when I open it up again and write
echo $JAVA_HOME
I only get an empty line. Can I edit the .profile
in another way? I've tried every possible combination to set this variable but I keep getting an empty line. I have restarted the system several times with no luck at all.
1
It sounds like the
– pst – 2011-10-14T22:36:29.620.profile
file is not being used. Are you sure it is~/.profile
that is being modified? And the permissions are correct? (I am not sure what shell OS X uses by default, but here is the relevant section in bash.)i just noticed that every time i save the .profile generates a new file every time i save and names it profile.save.2 and the number increases as i keep saving it. I don't think that's right. Any ideas? – madcoderz – 2011-10-14T22:46:08.280
what is the output of: cat .profile ? – None – 2011-10-14T22:56:54.780
i wrote cat .profile and i got No such file or directory i'm i doing something wrong? – madcoderz – 2011-10-15T04:35:39.610
By the way, this was working when i had Leopard as soon as i updated the operative system to OSX Lion the problem started happening. – madcoderz – 2011-10-15T04:42:03.023