The name of my
applet class was MyProjectApplet.class, packaged in a jar (unsigned) called MyProject.jar. My html code was:
<applet code="myPackage.MyProjectApplet.class" archive="MyProject.jar" width="180" height="45">
</applet>
It all worked fine, then recently I needed to make a few changes to the MyProjectApplet code but, when
testing it out, I noticed that these changes were not being picked up in IE - IE was still using the old code. (The new code ran fine in Firefox.)
Assuming the problem was down to IE caching the old class files, I cleared the IE cache (Tools -> Options -> Delete Files) - but the problem persisted...
So, to overcome the caching, I decided to rename my class and jar - to MyProjectApplet_New.class and MyProject_New.jar, changing my html code to:
<applet code="myPackage.MyProjectApplet_New.class" archive="MyProject_New.jar" width="180" height="45">
</applet>
And now I get the following message when IE tries to load my applet:
java.lang.InstantiationException: myPackage/MyProjectApplet_New
at com/ms/applet/BrowserAppletFrame.newInstance
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.run
at java/lang/Thread.run
And the strangest thing is that if I now use this html:
<applet code="myPackage.MyProjectApplet.class" archive="MyProject_New.jar" width="180" height="45">
</applet>
...that is, specifying the new jar but with the old applet class name (that doesn't even exist in the new jar), then the applet runs! (But it runs the old code, not the new code...)
Does anyone know what is going on? Have I missed something really obvious?
Thanks,
James