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

jpackage: Busy cursor remains after application has launched

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3
    • None
    • 17.0.4.1
    • tools
    • None
    • x86_64
    • windows_10

    Description

      Reproducer attached.

      ### Please provide a brief summary of the bug

      When an application is packaged for Windows with jpackage and then launched from the desktop icon or start menu (using the launcher created by jpackage) the mouse cursor continues showing a busy indicator for several seconds after the application has finished launching and displayed its main window.

      It might be because Windows is waiting for the launched process to call GetMessage:
      https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/ns-processthreadsapi-startupinfoa

      See also: https://stackoverflow.com/questions/7522685

      ### Please provide steps to reproduce where possible

      1. Take any simple Swing application (that will launch relatively quickly).
      2. Package the application for Windows using jpackage with the "--win-shortcut" option.
      3. Install the packaged application.
      4. Launch the application from the desktop using the installed shortcut.

      ### Expected Results

      The mouse cursor should have stopped showing the busy indicator, i.e. should have turned into a normal mouse cursor, when the application window is displayed.

      ### Actual Results

      The mouse cursor continues showing the busy indicator for several seconds after the application has finished launching and is displaying its main window.

      ![jpackage-cursor-bug](https://user-images.githubusercontent.com/556423/193458199-e4b9fd27-4adf-4bd9-ad93-08ae8f8818c6.png)

      ### What Java Version are you using?

      openjdk 17.0.4.1 2022-08-12 OpenJDK Runtime Environment Temurin-17.0.4.1+1 (build 17.0.4.1+1) OpenJDK 64-Bit Server VM Temurin-17.0.4.1+1 (build 17.0.4.1+1, mixed mode, sharing)

      ### What is your operating system and platform?

      Microsoft Windows [Version 10.0.19044.2006]

      ### How did you install Java?

      The MSI installer from adoptium.net:
      OpenJDK17U-jdk_x64_windows_hotspot_17.0.4.1_1.msi

      ### Did it work before?

      ```shell
      It works when the JAR file is launched using javaw.exe.
      ```

      ### Did you test with other Java versions?

      ```shell
      The problem also occurs with Azul's JDK: zulu17.36.17-ca-jdk17.0.4.1-win_x64.msi
      ```

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              karianna Martijn Verburg
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: