Ant is using wrong java version

前端 未结 16 1528
小蘑菇
小蘑菇 2020-11-28 09:20

I\'m using Ant 1.7.0 and installed java 1.6 which is in JAVA_HOME.

I want to build a project using java 1.5, so I\'ve exported JAVA_HOME to be my java 1.5 directory.

16条回答
  •  无人及你
    2020-11-28 10:19

    By default the Ant will considered the JRE as the workspace JRE version. You need to change according to your required version by following the below.

    In Eclipse:

    • Right click on your build.xml click "Run As", click on "External Tool Configurations..." Select tab JRE.

    • Select the JRE you are using.

    • Re-run the task, it should be fine now.

提交回复
热议问题