How do I set the global environment variables on Mountain Lion?

I'm a Java developer and my Eclipse doesn't recognize my environment variables anymore. There is some new way to set it? I was using the ~/.MacOSX/environment.plist


Thanks in advance.

MacBook Pro (13-inch Late 2011), OS X Mountain Lion

Posted on Jul 25, 2012 2:00 PM

Reply
2 replies

Jul 28, 2012 12:23 PM in response to alberson

Hi there,


didn't know environment.plist did exist, I'm setting my environment variables in a .profile in my home (~) folder.

What I do to enable global environment variables to be accessed by other applications like Eclispe is:


Open terminal and type:


launchctl setenv VARIABLE_NAME_TO_SET $EXISTING_VARIABLE_NAME


If you don't have the existing environment variables, you can simply give the absolute path of the environment variable


hope this helps...


Btw, I develop using 1.5 and I'm unable to get it to compile under 10.8, any thoughts?

I posted a new thread https://discussions.apple.com/thread/4150705

Jul 28, 2012 3:55 PM in response to xedod

I got the info from this: http://developer.apple.com/library/mac/#qa/qa1067/_index.html, that I've found a little time ago, but I was on 10.7.

I didn't found the link, but I've read that this plist doesn't work anymore on 10.8.


As for your problem, I'm not sure, I'm currently using 1.6/1.7.


I didn't try your solution yet, as soon as I do I'll edit this and reply. Thanks anyways.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How do I set the global environment variables on Mountain Lion?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.