[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 230
  • Last Modified:

Applet doesn't change when modified

Write an applet - works fine.  Make a change to the applet
and do the javac recompile to re-create the class but the
browser refuses to show the new applet modifications - it
keeps the old one, even if I clear cache, reload, etc.
What's the deal?  The only way I've been able to see the changes
is to give it a new name - surely there's something simple I'm
not doing.
0
robjay
Asked:
robjay
  • 3
  • 2
1 Solution
 
robjayAuthor Commented:
Edited text of question
0
 
diakovCommented:
Because the Java machine has already loaded once the class with the name of the applet. You have to quit every single instance of the browser, to kill the JVM. Then it will load the correct one.
The Netscape 4.5, however, seems to reload the applet class if modified after reload. You also have to specify some additional settings in the preferences.

Cheers,
  nik
0
 
diakovCommented:
http://www.javaworld.com/javaworld/javatips/jw-javatip7.html

This article gives 5 ways to make Netscape Reload the applet.
0
 
robjayAuthor Commented:
Thanks - I appreciate the url reference.  With Netscape 4.5b2, holding the Shift key down
while hitting reload works like a charm.  However, in the real-world, my goal is to program
applets that will change every hour, and I would like to avoid having to have a user method
of "go out and get Netscape 4.5 and hold down the shift key when you reload to see
the updates" or the hassle of quitting every instance of your browser.  Is there not some way to java code destruction to render the HTML meta tag equivalent of "<meta http-equiv="Pragma" content="no-cache" > effect for updated applets on your page?
0
 
diakovCommented:
If the applet class is the same name, this could be really difficult.

0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now