Ant - passing environment variables in IDEA to an Ant target

When running an Application directly from IDEA  (not using Ant plugin)  there is the "Environment Variables" button to allow you to pass this to your program.

Where is the equivalent when using the Ant plugin ?  I have a need to set and pass "LD_LIBRARY_PATH" to my program that is bootstrapped using an Ant target.    This is used in turn by a third party library that uses JNI to access OS dependent application.

I can't figure out how to do this. Naturally running Ant from Terminal outside of IDEA is not an issue.

any help ?

Mac OS X - Snow Leopard
IDEA 8.1.4
JDK 1.6


1 comment
Comment actions Permalink


I don't remember aby special UI to pass environment to ant script. But how do you refer to environment variables in Ant - via ${env.NAME} ? Maybe in this case it is possible to pass env.NAME variable to ant script in IDEA script properties dialog? This works.



Please sign in to leave a comment.