PATH env variable on Mac OS X and/or Eclipse

For those of you looking for an answer years later (Neon, Oxygen):

Some of my node and angular/angular2 tooling in eclipse failed due to missing $PATH entries in the MacOS terminal. Your tooling propably utilizes the embedded eclipse terminal which does not start providing your login/user shell. So you need to set the eclipse terminal in your eclipse preferences to start as --login shell in order to comprise your users PATH settings:

Go to:

Preferences -> Terminal -> Local Terminal

and set

Arguments to: --login

open a new Terminal inside Eclipse and your user's $PATH should be used from now on. Also everything you have set up in ~/.bash_profile will run when opening a new Terminal in Eclipse.


If you want to set an variable system wide on OSX you need to put it in your ~/.MacOSX/environment.plist file.

See this page on the apple website for more detail.


Had the same problem. Here is my solution:

  1. Edit the /etc/paths file to include the desired additional path.

  2. For a OSX installation, run /Applications/eclipse/eclipse not /Applications/eclipse/Eclipse.app

Tags:

Macos

Path