In Eclipse, click the ant file -- Run As -- External Tools Configuration and click on the JRE tab.
Select "Run in the same JRE as the workspace"