Maven release plugin: specify java compiler version

前端 未结 4 1293
清酒与你
清酒与你 2020-12-30 05:01

I have this project made of multiple jars and war to make an ear. I build everything in snapshot and it works great. Then I made a release for every single project and saw t

4条回答
  •  北海茫月
    2020-12-30 05:20

    You can verify the version a class is compiled for by using the javap utility included with the JDK. From the command line:

    javap -verbose MyClass
    

    In the output of javap look for "minor version" and "major version" about ten lines down.

    Then use this table:

    major       minor       Java platform version
    45          3           1.0
    45          3           1.1
    46          0           1.2
    47          0           1.3
    48          0           1.4
    49          0           1.5
    50          0           1.6
    

    The .class size difference may be due to compile version but also may be due to other compile options like compiling with debug information (line numbers in stacktraces).

提交回复
热议问题