Mac Os X Set Environment Variable For Application
Bundled Mac Os X Application
Many Java applications that use shell scripts to configure their environment use the JAVAHOME environment variable to start the correct version of Java, locate JRE JARs, and so on. In macOS X 10.6, the following paths seem to be valid for this variable. This tutorial will show you how to set your environment variables for use by both terminal and GUI applications in Mac OS X.
For the most part, Mac OS X programs do not use environment variables or the PATH. Parallels for mac vs vmware. They behave in a very different way from other Unix environments on this score. However, as Java developer I use several tools that require that other command line programs be available on the system PATH. In Windows and Unix there are well known places to put this kind of information but in Mac OS X the location for these changes is obscure.
Adding the variables to the /etc/profile, /etc/bashrc, ~/.profile, or ~/.bashrc files does not accomplish the task since these files are not used to setup the environment of the WindowServer process, the parent of all Mac OS X programs. I did, eventually, find some information on the subject.
Mac Os X Set Environment Variable For Applications
There are these articles: Environment Variables, QA1255 and QA1068.
Uninstall Mac Os X Applications
These articles were really hard for me to find, I think, because they were written mostly for folks wanting to port Unix applications to Mac OS X. In my case, I am attempting to use Java applications like Eclipse and Netbeans. Specifically, they needed the subversion commands on the path and they were installed into /usr/local/bin instead of /usr/bin. A good policy but not on the default PATH variable.
NOTE: I forgot to mention, you have to logout for these changes to have any effect.