Get Java version from Class file

Here is a small program to extract the java compile version from a java .class file.

It is based on the info from: http://en.wikipedia.org/wiki/Class_%28file_format%29

JavaClassFileCompilerVersion

JDK   v   d   HEX
———————–
J2SE 6.0=50 – 32
J2SE 5.0=49 – 31
JDK  1.4=48 – 30
JDK  1.3=47 – 29
JDK  1.2=46 – 28
JDK  1.1=45 – 27

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.