harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Lydick" <dlyd...@earthlink.net>
Subject JVM Spec version 2 and .class file versioning
Date Thu, 01 Jan 1970 00:00:00 GMT

While reviewing the class file structure of
java.lang.Object in Sun's 1.4.2_06 JDK, I
noticed that its major_version field is 48.
The JVM Spec version 2 says, "Implementations
of version 1.2 of the Java 2 platform can
support class file formats of versions in the
range 45.0 through 46.0 inclusive."  (That is,
major.minor version fields in the class file.)

The 1.5.0 JDK docs includes the same JVM spec
version as does the 1.4.2, namely at
for both of them.

Yet the root object file java.lang.Object has
minor/major version fields set to 0/48, respectively,
thus version 48.0, which is outside of the acceptable
range for both JDK 1.4.2 and 1.5.0.

Upon further inspection of this .class file (see also JVM
spec section 4.1 et al), I noticed that following the
access_flags field, there appears to be 8 unknown bytes,
followed by an expected three words of zeroes for the
this_class, super_class, and interfaces_count fields.
What follows those, though, is not intelligible to me
via the spec.

What gives?  Where can I find correct descriptions of
the latest .class file definitions for JDK 5?

Dan Lydick

View raw message