Version 1.3.1 and 1.4.0 incompatible?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Stefan_Schuler
Posted On:   Wednesday, November 7, 2001 09:19 AM

My application serializes a class StTextField which extends the JTextField class. Implemented in StTExtField is the Externalizable interface. So I just serialize a few elements, like color and bounds. The code will be executed by three different VMs: 1.) IBMs VM 1.3.0 2.) Suns VM 1.3.1 3.) Suns VM 1.4.0 The resulting file sizes are: 1.) 1382 Bytes 2.) 3760 Bytes 3.) 3986 Bytes Amazing, isn't it? But it comes much better. Each version can read it's own file back. So fare so good. Reading version 1.) is possible by versions 2.) and 3.). When reading version 2.) by version 3.) I get an local class incompatible error (SUID) f   More>>

My application serializes a class StTextField which extends the JTextField class.

Implemented in StTExtField is the Externalizable interface. So I just serialize a few elements, like color and bounds.

The code will be executed by three different VMs:

1.) IBMs VM 1.3.0

2.) Suns VM 1.3.1

3.) Suns VM 1.4.0

The resulting file sizes are:

1.) 1382 Bytes

2.) 3760 Bytes

3.) 3986 Bytes

Amazing, isn't it? But it comes much better. Each version can read it's own file back. So fare so good.
Reading version 1.) is possible by versions 2.) and 3.).
When reading version 2.) by version 3.) I get an local class incompatible error (SUID) for javax.swing.JComponent !
Since I defined my own SUID for the StTextField and this class implements the Externalizable interface, I
shouldn't get an error at all, right?

If i Check the file of version 1.) there is nothing inside about a JComponent class, but the files of 2.) and 3.) contains it!

Is this a VM bug? What shall I do? How can I prevent the VM from writing the JComponent stuff to file?

   <<Less
About | Sitemap | Contact