Setting the target version of Java in ant javac

前端 未结 4 1067
轮回少年
轮回少年 2020-12-02 21:40

I need to compile a jar file using ant (1.7.0) to run under a specific version of Java (1.5). I currently have Java 1.6 on my machine. I have tried setting:

         


        
4条回答
  •  日久生厌
    2020-12-02 22:32

    Use "target" attribute and remove the 'compiler' attribute. See here. So it should go something like this:

    
      
    
    

    Hope this helps

提交回复
热议问题