How do I compile a .java with support for older versions of Java?

后端 未结 5 1710
甜味超标
甜味超标 2020-11-27 04:43

I want to compile my .java\'s (several) into one .jar that are compatible with at least Java 1.6 and newer, preferably Java 1.5 and ne

5条回答
  •  孤街浪徒
    2020-11-27 05:10

    You can use javac -target 1.5 .

    If you're using a build system, Eclipse or some other IDE to build jars, please specify which one.

提交回复
热议问题