Solved

Applet doesn't change when modified

Posted on 1998-11-05
5
211 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
xampp tool 12 60
HashTable highest marks enumeration alternative 9 48
Crystal Reports Licensing Questions 4 65
collection output issue 9 66
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
The viewer will learn how to implement Singleton Design Pattern in Java.

726 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