Setting the target version of Java in ant javac

前端 未结 4 1073
轮回少年
轮回少年 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条回答
  •  旧时难觅i
    2020-12-02 22:45

    To find the version of the java in the classfiles I used:

    javap -verbose 
    

    which announces the version at the start as

    minor version: 0
    major version: 49
    

    which corresponds to Java 1.5

提交回复
热议问题