Hallo,
I'm writing a Java server application which sends (via socket) an image
to an applet.
I'm trying to use
ObjectOutputStream out = new
ObjectOutputStream(socket.getOutputStream());
Image img = Toolkit.getDefaultToolkit().getImage("...");
out.writeObject(img);
in server side and
ObjectInputStream in = new
ObjectInputStream(socket.getInputStream());
Image img = (Image)in.readObject();
in client side.
When programs run on my computer (linux RH5.0, jdk1.1.5)
they give me this error sending image:
java.io.WriteAbortedException: Writing aborted by exception;
java.io.NotSerializableException: sun.awt.windows.WImage
What is wrong?
Does anyone know if there is a better way to send image via socket?
Thanks,
stf