title: java rmi passing ImageIcon objects
body: <p>I m making an <code>rmi client server based program</code> which is suppose to <code>pass Image object through remote object interfaces</code>. <strong>The Client receives an Image from the Server</strong>.</p>
  
  <p>Following is my code....</p>
  
  <p><strong>At Client</strong></p>
  
  <pre><code>       public class ImageReceiver
         {
                    public static ImageIcon imageicon;
  
                    public static void main(String Data[])
                    {
  
                           imageicon = new ImageIcon(url);
                           imageicon=remoteObject.getImageFromServer();
                    }
  
          }
          // The Details regarding the binding of remote objects are excluded since they are worling fine...
  </code></pre>
  
  <p>sendImage is an interfacing method implemented...</p>
  
  <pre><code>        public ImageIcon getImageFromServer() throws RemoteException;
  </code></pre>
  
  <p><strong>At Server</strong></p>
  
  <pre><code>           public ImageIcon getImageFromServer()
             {
                    ImageIcon ic = new ImageIcon("local url specified");
                    return ic;
             }
  
           // Much of the Exceptions and other binding details are excluded for simpicity.....
  </code></pre>
  
  <p>Now the problem is, i m getting an error called</p>
  
  <pre><code>          java.rmi.UnmarshalException: error unmarshalling return
            nested exception is: java.io.EOFException               
  </code></pre>
  
  <p>Now, Actually i don't have much of any idea how it came...
  The two major doubts I have is....</p>
  
  <p><em><strong>Is it possible to send ImageIcon objects through rmi...?? If yes, What could be probably the mistake here. If not, does there exist any simple way to pass Image based objects as parameter through rmi...??</em></strong></p>
  
  <p><strong>I've also heard somewhere that javax.swing.ImageIcon is serial....but it's not happening in my case</strong> </p>