I'm trying to send a few Objects around through java.net.Socket
and java.net.ServerSocket
by using an ObjectOutputStream
and ObjectInputStream
but I've come across an issue with that. The objects I'm trying to send aren't serializable. I've tried sending them as a String
but it can't be cast. Any work-arounds for this issue?
EDIT:
I was looking through the StackTrace of the problem, and found that it's being thrown by JLabel. I thought that was odd, due to the fact that JLabel implements Serializable. But when I checked the JavaDocs through eclipse and came to the line where the error was being thrown by public boolean updateImage(ect..)
and realized that it's due to Icon. Is there any way to avoid the issue?