What version of javac built my jar?

前端 未结 20 892
孤街浪徒
孤街浪徒 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:43

    The Java compiler (javac) does not build jars, it translates Java files into class files. The Jar tool (jar) creates the actual jars. If no custom manifest was specified, the default manifest will specify which version of the JDK was used to create the jar.

提交回复
热议问题