• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Preloading applet classes from a signed jar?

 
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an applet (called MainApplet) located at applet.htm. The applet takes a while to load...

Before reaching that page, the user first goes to index.htm.

In index.htm, I want to preload the applet classes.

One method I've seen is to deploy a PreLoaderApplet within index.html that uses Class.forName() to preload the MainApplet classes.

The jar that the two applets are in must be signed, but I don't want the user to be presented with the security certificate when he first gets to index.html.

So is there any way I can preload the classes without the user being asked to accept a security certificate?

Thanks in advance,
James
 
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm wondering why the applets should be signed? Will it be because you are using the Class.forName() method?

If so you can load all classes manually by manually refering them:

So instead of doing this: Class.forName("com.test.PreloadedClass");
You could do this: com.test.PreloadedClass.class.getName();
It should also load the class and no special security requirements are made.

But once again. I'm not sure why you need to sign the applet so maybe this is not the solution for this problem!
Let me know if it works for you!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic