How can I instantiate a serialized JavaBean into an applet if my .ser file is in jar or zip archive?

John Zukowski

The Beans.instantiate() method needs to be passed the proper classloader. Just passing in null is not sufficient for an applet. For instance, if your class was Foo.class, use the following:

Beans.instantiate(
  Foo.class.getClassLoader(),"Foo");
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact