Rmi compilation to native code
Mark Wielaard
mark@klomp.org
Sat Feb 23 01:39:00 GMT 2002
Hi,
On Sat, 2002年02月23日 at 00:17, Tom Tromey wrote:
> >>>>> "Bryce" == Bryce McKinlay <bryce@waitaki.otago.ac.nz> writes:
>> Bryce> If they don't, there can be problems in some cases due to inner
> Bryce> classes etc having slightly different flags and synthetic
> Bryce> method names under GCJ compared to javac, all of which effect
> Bryce> the SerialVersionUID calculation.
>> Is this fixable? Could you file a PR for it? It would be nice to
> have full compatibility here if possible.
Note that even Sun breaks compatibility if you go from their 1.3 javac
to 1.4. <http://java.sun.com/j2se/1.4/compatibility.html>
* If a serializable inner class contains explicit references to to
its class object, then the computed value of the serial version UID
for the class will be different in J2SE 1.3 and J2SE 1.4. The
difference is due to the fact that the computation of the serial
version UID is sensitive to modifications made in the javac compiler
between J2SDK 1.3 and J2SDK 1.4.
To avoid this problem affecting your applications, we recommend that
you add an explicit serial version UID to your serializable classes.
You can use the serialver tool to obtain the serial version UID of
classes compiled with the J2SDK 1.3 javac compiler.
Basically saying, always use the same compiler to compile your classes
or break serialization. Sigh. I haven't found documentation of the
precise changes or how their new javac generates synthetic method names,
etc.
Cheers,
Mark
More information about the Java
mailing list