Shell environment variables not available in GUI apps even if app launched via Command Line
You can try something like this:

launchctl setenv VARIABLE VALUE
open -a IntelliJ\ IDEA\ 11
launchctl unsetenv VARIABLE


This will pass environment variable VARIABLE into the launched app and later it will be cleaned, but will remain in the app.