[jdom-interest] communication between an application and an applet
    Yilin Liu 
    g8901 at cs.nccu.edu.tw
       
    Thu Jul  5 22:24:38 PDT 2001
    
    
  
Hello,
    I have a problem about sending an Element object between an application and an applet.
    My sample codes are below :
       Application:
           ObjectOutputStream out;
           
           out = new ObjectOutputStream(socket.getOutputStream());
           Element test = (new Element("Test")).setAttribute("message", "hello");
           out.write(test);
           out.flush();
           
        Applet :
           ObjectInputStream in;
           Element msg = (Element)in.readObject();
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        At this step, java console shows that an InvalidClassException about ArrayList is thrown.
     Is it a serialization problem between an application and an applet?
     Can I solve the problem if I did not install jdk1.2 plug-in and instead of putting all jdk1.2 classes in the applet directory?
    
    PS. the communication between applications work.
    thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20010706/69355fd3/attachment.htm
    
    
More information about the jdom-interest
mailing list