> Sun has some excellent documentation that describes the whole class
> file format, but it doesn't seem to explain what the differences are
> between the different format versions.
There aren't any. The only differences are the version numbers themselves.
Sun have introduced new "attributes" at various times, but none of the new ones
affect the runtime semantics.
I think there is a real change in 1.5 in that, as I understand it, the "ldc"
instruction is allowed to be refer to class name entries in the constant pool
in addition to Strings and numbers. (A useful change, but it is /really/ worth
breaking backward compatibility for ??)
-- chris
javaprog - 28 May 2004 09:55 GMT
> > Sun has some excellent documentation that describes the whole class
> > file format, but it doesn't seem to explain what the differences are
[quoted text clipped - 10 lines]
>
> -- chris
Thanks.
Actually I've found what I was looking for. There seem to be some
subtle differences in the bytecode format a la:
--
As of J2SE 1.4.0, the javac bytecode compiler uses "-target 1.2" by
default as opposed to the previous "-target 1.1" behavior. See the
reference page for the javac compiler for descriptions of these
behaviors. One of the changes involved in targeting 1.2 is that the
compiler no longer generates and inserts method declarations into
class files when the class inherits unimplemented methods from
interfaces. These inserted methods, like all other non-private
methods, are included in the default serialVersionUID computation. As
a result, if you define an abstract serializable class which directly
implements an interface but does not implement one or more of its
methods, then its default serialVersionUID value will vary depending
on whether it is compiled with the J2SE 1.4 version of javac or a
previous javac.
--
and I guess that coupled with the slightly sketchy Waba VM, that's
enough to stop it working.
Andrew Thompson - 28 May 2004 10:34 GMT
>>> ...class file format
> Actually I've found what I was looking for. There seem to be some
> subtle differences in the bytecode format a la:
..glad to hear you got it sorted. :-)

Signature
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology