Does this work?
from:
http://stackoverflow.com/questions/9...g-java-version
- Right click on the task in your ant build file (build.xml).
- Mouse over "Run As", click on "External Tool Configurations...".
- Add followings to "Arguments":
- Dant.build.javac.target=1.8 -Dant.build.javac.source=1.8