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

Desktop integration dialog disappears too quickly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 5.0
    • deploy
    • x86
    • windows_nt



      Name: dfR10049 Date: 09/24/2003


      During desktop integration on Windows 2000 jnlp client runs an application
      and suggests to add a shortcut for desktop. But if an application shows
      some frame and closes it the desktop integration dialog is also closing.

      Example of such application:
      -----8<----------- HelloWorld.java ---------------
      import java.awt.Frame;
      import java.awt.TextField;

      public class HelloWorld {

          public static void main(String args[]) {

              showFrame("Hello world!");
              showFrame("Good morning!");

          }

          static void showFrame(String msg) {
              Frame f = new Frame("Hi!");
              f.add(new TextField(msg));
              f.setSize(200, 200);
              f.setVisible(true);


              try {
                  Thread.currentThread().sleep(5000);
              } catch (Exception e) {
              }
              f.setVisible(false);
          }
      }

      ----------------------------------------------------
      -----8<----------- hello.jnlp ----------------------

      <?xml version="1.0" encoding="UTF-8"?>
      <jnlp spec="0.2+"
        codebase="file:///c:/hello">
        <information>
          <title>HelloWorld application</title>
          <vendor>Sun Microsystems, Inc.</vendor>
          <homepage href="index.html"/>
          <offline-allowed/>
          <shortcut online="false">
               <desktop/>
          </shortcut>
        </information>
        <resources>
          <j2se version="1.5"/>
          <jar href="hello.jar"/>
        </resources>

        <application-desc main-class="HelloWorld">
        </application-desc>

      </jnlp>
      ----------------------------------------------------

      Desktop integration dialog is visible until the first frame is visible.
      When the second frame is showing up, the dialog is already disappeared.

      ======================================================================

            Unassigned Unassigned
            fdasunw Fda Fda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: