Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2006

Tip: Looking for answers? Try searching our database.

1.4 objects in 1.5 ?

Thread view: 
VisionSet - 25 Jul 2006 17:18 GMT
I think the answer is no, but can you handle objects created by 1.4
compiled code in 1.5 code?
I want 1.4 on the client and 1.5 on the server and yes I serialise
objects between the two. Bad I know.

TIA
Mike W
Thomas Hawtin - 25 Jul 2006 20:38 GMT
> I think the answer is no, but can you handle objects created by 1.4
> compiled code in 1.5 code?
> I want 1.4 on the client and 1.5 on the server and yes I serialise
> objects between the two. Bad I know.

So long as you use serialVersionUID and your object classes are not from
Swing or are anonymous or local inner classes, you should be fine.

Swing doesn't guarantee to keep compatibility between major releases.

3rd Ed JLS pins down generated names of inner classes better than
previous editions, but does not completely match earlier compiler
behaviour (and you are strongly discourage in the spec).

IIRC, between certain versions, javac produces different methods/fields
used in the calculation of serialVersionUID. Things like class constants
and static initialisers may change. So specifying the UID is a good idea.

Tom Hawtin
Signature

Unemployed English Java programmer
http://jroller.com/page/tackline/

VisionSet - 26 Jul 2006 11:13 GMT
> > I think the answer is no, but can you handle objects created by 1.4
> > compiled code in 1.5 code?
[quoted text clipped - 3 lines]
> So long as you use serialVersionUID and your object classes are not from
> Swing or are anonymous or local inner classes, you should be fine.

Excellent, got it working now, thanks.
Now to sort out the "gui/threading/screwy rendering due no doubt to
something not occuring on the event thread that should be" problem.

Mike W


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.