I have a similar problem with KUbuntu 14.04, Eclipse Kepler and ANT. Here is what I did:
goto Run -> External Tools -> External Tools Configurations ...
Choose the configuration of your ant build
Go to the Environment tab and add the environment variable using the "New" button