Solved

Applet doesn't change when modified

Posted on 1998-11-05
5
181 Views
Last Modified: 2010-03-30
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
Comment
Question by:robjay
  • 3
  • 2
5 Comments
 

Author Comment

by:robjay
ID: 1227013
Edited text of question
0
 
LVL 8

Expert Comment

by:diakov
ID: 1227014
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
 
LVL 8

Accepted Solution

by:
diakov earned 50 total points
ID: 1227015
http://www.javaworld.com/javaworld/javatips/jw-javatip7.html

This article gives 5 ways to make Netscape Reload the applet.
0
 

Author Comment

by:robjay
ID: 1227016
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
 
LVL 8

Expert Comment

by:diakov
ID: 1227017
If the applet class is the same name, this could be really difficult.

0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
sumHeights2  challenge 7 78
Fibonacci challenge 11 84
Unexpected HttpURLConnection connection behavior 2 52
recursion example 16 70
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now