• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

classLoader inside an applet

 
James Rydell
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an applet wrapped up in a jar.
Many of the classes in the jar have static variables which is causing a problem when I have more than one window with the applet open.

From what I gather if I could write my own classLoader and ensure that my classes were being loaded into separate namespaces for each instance of the applet, separate instances of the static variables would exist in the JVM.

But, as I understand it, for security reasons applets can't contain a classLoader.

Is there a way round this?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, there is: you can sign the applet or change your local security policy to allow this. See this page for details.
 
James Rydell
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. I'll look into it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic