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

jpackage'd launcher reports non-zero exit codes with error prompt

    XMLWordPrintable

Details

    • b01
    • b17
    • x86_64
    • windows

    Backports

      Description

        A DESCRIPTION OF THE PROBLEM :
        When the java application exits with a non-zero exit code, starting with JDK 17.0.2 this is reported by the .exe launcher generated by jpackage. This breaks applications that use exit codes to report results to their surrounding context.

        This is a regression introduced by (seemingly left over debug code from) JDK-8272328

        REGRESSION : Last worked in version 17

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        jpackage + run the attached program

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        app exits with status code 1
        ACTUAL -
        error prompt displays "Child process exited with code 1"

        ---------- BEGIN SOURCE ----------
        public static void main(String[] args) {
          System.exit(1);
        }
        ---------- END SOURCE ----------

        CUSTOMER SUBMITTED WORKAROUND :
        export PATH=%PATH%;C:\path\to\installation\app

        FREQUENCY : always


        Attachments

          1. ErrorMsg.png
            ErrorMsg.png
            44 kB
          2. myjar.jar
            0.7 kB

          Issue Links

            Activity

              People

                asemenyuk Alexey Semenyuk
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: