简体   繁体   中英

Configuring Java version for ANT in eclipse

In IntelliJ if I want to configure the version of Java my ANT script uses I can just right click and set the properites for ANT and select the JDK I want to use. In Eclipse I don't see any such option. Do I need to hard code the version of Java into my Script or is there any way to tell ANT what version I want it to use?

You can do this in the Run Configuration . Right click your ant file ant select Run as -> Ant Build... . On the JRE tab you can switch to any JRE.

Maybe you have to add the concerning JRE to eclipse first by clicking Installed JREs... this opens the Eclipse preferences dialog where you can add it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM