F
F
fdkur342018-10-20 16:31:59
Java
fdkur34, 2018-10-20 16:31:59

What version of JDK is the jar file compiled with?

Need to know what version of JDK this jar file is compiled with ? PS This is the usual Hello World - I compiled it as an example. OpenJDK or OracleJDK or some others?
How can I do that? I know that, for example, the command java -Xinternalversionwill say which compiler this particular version of the JDK was built with. Is it possible to do this on the current or on any other jar file?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg A, 2018-10-22
@fdkur34

If we ignore the license side of the issue and still want to know the version, then you can take one of the class files from the jar and run
Unix/Linux: Windows: Java 1.2: major version 46 Java 1.3: major version 47 Java 1.4: major version 48 Java 5 : major version 49 Java 6: major version 50 Java 7: major version 51 Java 8: major version 52 Java 9: ​​major version 53 Java 10: major version 54 Java 11: major version 55

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question