Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6913990

Java Plugin does not reload applets

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 7
    • deploy
    • x86
    • windows_7

      J2SE Version (please include all output from java -version flag):
      >java -version
      java version "1.7.0-ea"
      Java(TM) SE Runtime Environment (build 1.7.0-ea-b75)
      Java HotSpot(TM) Client VM (build 17.0-b04, mixed mode, sharing)

      Does this problem occur on J2SE 1.4.x or 5.0.x or 6.0? Yes / No (pick one)
      Yes


      Operating System Configuration Information (be specific):
      Window 7


      Hardware Configuration Information (be specific):
      Athlon 64 X2


      Bug Description:
      This problem occurs when the java plugin is used in Firefox.

      A web page that contains an applet gets reloaded when clicking on the
      reload button and keeping SHIFT pressed. However, the applets referred
      to from it are not reloaded. I.e. the cached files are used even when
      there are newer ones.

      Reproducible: Always

      Steps to Reproduce:
      1. compile the following applet (TestApplet.java):

      import java.applet.Applet;
      public class TestApplet extends Applet{
          public void init(){
          }
          public String meth(){
              return("aaa");
          }
      }

      2. load the following page in Firefox


      <HTML>
      <BODY>
      <APPLET CODE="TestApplet" WIDTH=10 HEIGHT=10 NAME="testapplet">
      </APPLET>
      <input type="button" value="test" onclick="alert(document.testapplet.meth())">

      </BODY>
      </HTML>

      3. click the button. The alert "aaa" will be shown.

      4. Change TestApplet.java (e.g., replace "aaa" with "bbb").
      5. SHIFT reload the page, and click the button: the old string will be

      displayed
      Actual Results:
      An obsolete applet is run, which is the cached it instead of taking the one
      with a more recent creation time.

      Expected Results:
      The expected results are the ones provided by the new applet.


      This bug hinders considerably the development of applets. Several workarounds
      have been posted to the internet. Many do not work at all, some do only at
      times, and some are too cumbersome (like, e.g. clearing the cache and

      restarting the browser).

      I have filed this bug first to Mozilla. They replied that it is up to the
      java plugin to manage applets, and that the java plugin manages its own cache.

            almatvee Alexander Matveev
            tyao Ting-Yun Ingrid Yao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: