What version of javac built my jar?

前端 未结 20 896
孤街浪徒
孤街浪徒 2020-11-27 09:48

How can I tell what version of the Java compiler was used to build a jar? I have a jar file, and it could have been built in any one of three JDKs. We need to know exactly

20条回答
  •  迷失自我
    2020-11-27 10:49

    Here is Java's way to find this information.

    Windows: javap -v | findstr major
    Unix: javap -v | grep major

    For example:
    > javap -v Application | findstr major   major version: 51

提交回复
热议问题