I’m trying to find out how I can determine the version of a .class file by looking at its binary data. I know that using javap will tell me the version – but unfortunately I don’t always have a JDK installed on the machine where I need to check. I do however have access to a plain old HEX editor …
I tried finding documentation on this from a certified source – all I was able to come up was with this: http://fredericktang.wordpress.com/2007/09/28/java-class-file-version/
Although this blog post is very nicely written – it is not really backed up by official Java documentation.
Any hint?
Edit: Never mind – sorry to bug – I found the spec:
here
The JVM specification is about as authoritative as you’re going to get. Chapter 4 is probably what you’re after.