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

JavaWebStart doesn't call applet's destroy() method

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 1.0.1
    • deploy
    • generic
    • generic

      Found the duplicate after I posted the bug.

      Name: nt126004 Date: 10/16/2001


      java version "1.2.2"


      It seems that Java Web Start doesn't call the applet's destroy() method when quitting

      example :

      My applet code is :

      package example;

      import java.awt.*;
      import java.awt.event.*;
      import java.applet.*;

      public class HelloWorld extends Applet {

        public HelloWorld() {
        }

        public void init(){
          System.out.println("INIT");
        }

        public void start(){
          System.out.println("START");
        }

        public void paint(Graphics g){
          g.drawString("Hello world !", 10, 10);
        }

        public void stop(){
          System.out.println("STOP");
        }

        public void destroy(){
          System.out.println("DESTROY");
        }
      }

      My jnlp is :

      <?xml version="1.0" encoding="utf-8"?>
            <jnlp
              spec="1.0+"
              codebase="http://ariane/"
              href="example.jnlp">
              <information>
                <title>Example</title>
                <vendor>Atos Origin</vendor>
                <homepage href="http://ariane/"/>
                <icon href="http://ariane/IMAGES/pills.gif"/>
                <description kind="short">Hello World</description>
              </information>
              <security>
                  <no-permissions/>
              </security>
              <resources>
                <j2se version="1.3" initial-heap-size="16m" max-heap-size="96m"/>
                <jar href="http://ariane/CLASSES/example.jar" main="true"
      download="eager"/>
              </resources>
              <applet-desc
               name = "Hello world"
               main-class = "example.HelloWorld"
               width = "400"
               height = "400" >
              </applet-desc>
            </jnlp>


      When i quit the applet, the methods destroy neither stop are not called.
      (Review ID: 133826)
      ======================================================================

            Unassigned Unassigned
            nthompsosunw Nathanael Thompson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: