@see http://stackoverflow.com/questions/829749/launch-mac-eclipse-with-environment-variables-set
Follow these steps:
cd /Applications/STS.app/Contents
Edit
Info.plist
Replace
<string>STS</string>
underneath
<key>CFBundleExecutable</key>
with
<string>STS.sh<string>
Save changes to the file.
cd MacOS
touch STS.sh
chmod +x STS.sh
Edit STS.sh
to be
#!/usr/bin/env bash -l
source ~/.bash_profile
logger "`dirname \"$0\"`/STS"
exec "`dirname \"$0\"`/STS" $@
then save changes to the file.
Execute
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -v -f /Applications/STS.app
Launch STS
Et voila!