This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Serialization between gcj- and javac compiled classes?
- From: Dalibor Topic <robilad at kaffe dot org>
- To: David Daney <ddaney at avtrex dot com>
- Cc: Bryce McKinlay <mckinlay at redhat dot com>, Martin Egholm Nielsen <martin at egholm-nielsen dot dk>, java at gcc dot gnu dot org
- Date: Wed, 26 May 2004 18:36:54 +0200
- Subject: Re: Serialization between gcj- and javac compiled classes?
- References: <c91ni7$lmj$1@sea.gmane.org> <40B4BC64.5010801@redhat.com> <40B4C317.1000505@avtrex.com>
David Daney wrote:
Bryce McKinlay wrote:
Martin Egholm Nielsen wrote:
This may be very trivial question if one knows exactly how strict Sun
has specified the rules for serialization. Nevertheless, here goes:
Is there compatibility between serialized objects comming from a
Sun's javac generated class-file and a native class from gcj?
(and I will have serialVersionUID defined...)
Yes, they should be compatible, but only if you have serialVersionUID
defined.
I don't know how libgcj calculates the serialVersionUID, but my reading
of the serialization specification is that if the identical class exists
in two different runtimes (Sun's and libgcj for example) that the
serialized form is compatible even without the explicit serialVersionUID.
If libgcj does not work this way, then I would say that it is broken and
should be fixed.
This should be a faq :)
http://www.mail-archive.com/classpath@gnu.org/msg05090.html
cheers,
dalibor topic