Hi All,
Been pulling my hair out and wondered if anyone here could give me an insight.
I have written a TCP socket based client and server for a java application and I am attempting to send serialized objects over the socket.
At one end I have :
At the other:
When I run the application, and the client starts sending - the server simply throws "Class Not Found", and when checked the available bytes on the buffer never go above 0.
When I have tried sending ints or Strings over the socket they come through just fine - I am a bit stuck by this, and with no-one to ask at the weekend I wondered if anyone here could help! Sorry If i have missed anything.
Thanks,
Simon
Been pulling my hair out and wondered if anyone here could give me an insight.
I have written a TCP socket based client and server for a java application and I am attempting to send serialized objects over the socket.
At one end I have :
Code:
ObjectOutputStream myOutStream = new ObjectOutputStream(Socket.getOutputStream());
myOutStream.writeObject(mySerializeableObject);
myOutStream.flush();
At the other:
Code:
ObjectInputStream myInStream = new ObjectInputStream(Socket.getInputStream());
MySerializableObject newObject = (MySerializableObject ) myInStream.readObject();
When I run the application, and the client starts sending - the server simply throws "Class Not Found", and when checked the available bytes on the buffer never go above 0.
When I have tried sending ints or Strings over the socket they come through just fine - I am a bit stuck by this, and with no-one to ask at the weekend I wondered if anyone here could help! Sorry If i have missed anything.
Thanks,
Simon