How to setup Path variables for GUI application on Mac El Captain (10.11.4)

2

1

I have tried everything listed as answers on this portal as well as on other portals to set environment variables globally for GUI apps.

I have listed the environment variables in file '/etc/launchd.conf', '/etc/paths' also in '~/Library/LaunchAgents/environment.plist' but nothing seems to be modifying the $PATH that is read in GUI apps. Specifically I am trying to run 'adb' commands from Eclipse.

I have mentioned the ANDROID_HOME, JAVA_HOME and also modified the path as PATH = "$PATH:/Users/neetesh/Library/Android/sdk/platform-tools" for platforrm_tools in the app EnvPane but nothing seems to be working Eclipse shell command is still reading the PATH as: PATH=/usr/bin:/bin:/usr/sbin:/sbin.

System.getenv() command does printout 'ANDROID_HOME' and 'JAVA_HOME' may be from the settings in EnvPane app, but if I am running the command "adb devices", it's still printing "Cannot run program 'adb'".

If I run the Eclipse from terminal everything seems to be fine.

If someone has the real solution for Mac El Captain (10.11.4). Please help me.

Neetesh Kumar Gupta

Posted 2017-05-01T15:17:27.963

Reputation: 21

No answers