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

Application launched with jpackage produced .exe crashes JVM

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 15, 16
    • Fix Version/s: 16
    • Component/s: deploy
    • Environment:

      Microsoft Windows [Version 10.0.19041.572]

      openjdk 15 2020-09-15
      OpenJDK Runtime Environment (build 15+36)
      OpenJDK 64-Bit Server VM (build 15+36, mixed mode)

    • Subcomponent:
    • Introduced In Version:
      15
    • Resolved In Build:
      b24
    • CPU:
      x86_64
    • OS:
      windows_10

      Description

      Creating an application image with jpackage from a JRE image produced with jlink and a set of jars, the resulting application crashes the JVM when launched by the .exe launcher created by jpackage, but launches correctly when using the java.exe from the JRE image.
      The .cfg file only has mainclass and classpath info, no JVM options.

      When running from the application image folder (the one with app and runtime sub-folders) with the command line:

      runtime\bin\java.exe -cp app\libs\* mainclassname

      the application launches and runs as expected.
      Launching via the application .exe file produces the crash report attached.
      The JRE image was created with:

      jlink.exe --no-header-files --no-man-pages --compress=2 --add-modules javafx.controls,javafx.fxml,java.prefs,java.logging,java.management,jdk.jdwp.agent --output C:\dev\MyApp\build\image\runtime

      jpackage used the following command line:

      jpackage.exe --type app-image --verbose --temp C:\dev\MyApp\build\tmp\image --app-version 1.0.4 --input C:\dev\MyApp\build\image\app --runtime-image C:\dev\MyApp\build\image\runtime --name "My Server Admin" --main-jar libs\MyApp-1.0.4.jar --main-class my.domain.serveradmin.MyServerAdminApp --resource-dir src/main/deploy/package/windows --icon "src/main/deploy/package/windows/My Server Admin.ico" --description "My Server Administration Application" --vendor "My Company" --copyright "Copyright (c) 2015-2020 My Company Corp." --dest C:\dev\MyApp\build\application

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                herrick Andy Herrick
                Reporter:
                swpalmer Scott Palmer
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: