<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=big5" http-equiv=Content-Type>
<META content="MSHTML 5.00.3315.2870" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=細明體 size=2>Hello,</FONT></DIV>
<DIV><FONT face=細明體 size=2> I have a problem
about sending an Element object between an application and an
applet.</FONT></DIV>
<DIV><FONT face=細明體 size=2> My sample codes are below
:</FONT></DIV>
<DIV><FONT face=細明體 size=2>
Application:</FONT></DIV>
<DIV><FONT face=細明體
size=2> </FONT><FONT
face=細明體 size=2>ObjectOutputStream out;</DIV>
<DIV>
<DIV><FONT face=細明體
size=2> </FONT></DIV>
<DIV></FONT><FONT face=細明體
size=2> out =
new
ObjectOutputStream(socket.getOutputStream());<BR> </FONT><FONT
face=細明體 size=2>Element test = (new Element("Test")).setAttribute("message",
"hello");</FONT></DIV>
<DIV><FONT face=細明體
size=2> out.write(test);</FONT></DIV>
<DIV><FONT face=細明體
size=2> out.flush();</FONT></DIV>
<DIV><FONT face=MingLiu
size=2> </FONT></DIV>
<DIV><FONT face=MingLiu size=2> Applet
:</FONT></DIV>
<DIV><FONT face=細明體 size=2><FONT face=細明體
size=2> ObjectInputStream
in;
<DIV>
<DIV><FONT face=細明體
size=2> </FONT></FONT></FONT><FONT
face=MingLiu size=2>Element msg
= (Element)in.readObject();<BR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</FONT></DIV>
<DIV><FONT face=MingLiu size=2> At
this step, java console shows that an InvalidClassException about ArrayList is
thrown.</FONT></DIV>
<DIV><FONT face=細明體 size=2> Is it a
serialization problem between an application and an applet?</FONT></DIV>
<DIV><FONT face=細明體 size=2> 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?</FONT></DIV>
<DIV><FONT face=細明體 size=2> </FONT></DIV>
<DIV><FONT face=細明體 size=2> PS. the communication between
applications work.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=細明體 size=2> thanks.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=MingLiu
size=2></FONT> </DIV></DIV></DIV></DIV></BODY></HTML>