<!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=MingLiu size=2>hi all, </FONT></DIV>
<DIV><FONT face=MingLiu size=2> I use ObjectInputStream to
read Element object in applet.</FONT></DIV>
<DIV><FONT face=MingLiu size=2> the sample codes is:
</FONT></DIV>
<DIV><FONT face=細明體 size=2>
server:
<DIV><FONT face=細明體
size=2> out
= new ObjectOutputStream(socket.getOutputStream());</FONT></DIV>
<DIV><FONT face=細明體 size=2>
out.writeObject((new
Element("Test")).addAttribute("hello", "all");</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=細明體 size=2>
</FONT>client: Socket socket = new Socket(host,
port);</FONT></DIV></DIV>
<DIV><FONT face=MingLiu size=2>
in = new
ObjectInputStream(socket.getInputStream()); </FONT></DIV>
<DIV><FONT face=MingLiu size=2>
Element value =
(Element)in.readObject();</FONT></DIV>
<DIV><FONT face=MingLiu size=2> </FONT><FONT face=細明體
size=2></FONT></DIV>
<DIV><FONT face=細明體 size=2> in runtime, I get
the exception "java.io.InvalidClassException:
java.util.ArrayList;
</FONT></DIV>
<DIV><FONT face=細明體 size=2>
IllegalAccessException<BR> at
java/io/ObjectInputStream.initNewObject<BR> at
java/io/ObjectInputStream.readNewObject<BR> at
java/io/ObjectInputStream.readObject<BR> at
com/ms/!!!Internal_Class_0.DefaultReadMethod<BR> at
java/io/ObjectInputStream.invokeDefaultReadObject<BR> at
java/io/ObjectInputStream.defaultReadObject<BR> at
org/jdom/Element.readObject<BR> at
java/io/ObjectInputStream.invokeReadObject<BR> at
java/io/ObjectInputStream.readNewObject<BR> at
java/io/ObjectInputStream.readObject<BR> at ClientThread.run</FONT><FONT
face=細明體 size=2>" in jdom-b7.</FONT></DIV>
<DIV><FONT face=細明體 size=2> </FONT></DIV>
<DIV><FONT face=細明體 size=2> please tell me how to solve this
problem??</FONT></DIV>
<DIV><FONT face=細明體 size=2> thanks.</FONT></DIV></BODY></HTML>