Maven: javac: source release 1.6 requires target release 1.6

后端 未结 6 1077
说谎
说谎 2020-12-08 04:48

NOTE: This appears to be a limit in the \"javac\" program.

I have Java 6 code that needs to be built for a Java 5 JVM. My previous work with the javac ant target (

6条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-08 05:31

    What Java 6 language features are you using that are not present in Java 5? As far as I can tell, the only "feature" that's been added to the language is the use of the @Override annotation in interfaces. Otherwise, Java 6 and Java 5 are source-compatible. What happens when you use:

    1.5
    1.5
    

    in your Maven build file?

提交回复
热议问题