Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

anyway to make objects in an arraylist serializable??

807597May 10 2005 — edited Nov 2 2007
im doing an assignment which im using objectinput/output streams to send over an arraylist, i know arraylist implements serializable already but problem is i did a search on this site and it said the objects in the arraylist must also be serializable. im storing Image objects in my arraylist, which arent serializable. any suggestions as to how i can still send over this arraylist of Image objects and not have a

java.io.NotSerializableException: sun.awt.image.ToolkitImage

exception? would making my own arraylist class and having it implement serializable solve the problem? or do i have to go the route of making my own Image class and have it serializable the only way?

thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 30 2007
Added on May 10 2005
9 comments
1,799 views