Ant is using wrong java version

前端 未结 16 1492
小蘑菇
小蘑菇 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条回答
  •  Happy的楠姐
    2020-11-28 10:08

    Use the following 2 properties for javac tag:

    fork="yes"  
    executable="full-path-to-the-javac-you-want-to-use".
    

    Explaination of the properties can be found here

提交回复
热议问题