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

Application exe does not launch from an outside path

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: 16
    • Fix Version/s: None
    • Component/s: tools
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      ADDITIONAL SYSTEM INFORMATION :
      JAVA_VERSION="16.0.1"
      Microsoft Windows 10 Enterprise
      OS Version:10.0.18363 N/A Build 18363

      A DESCRIPTION OF THE PROBLEM :
      The exe created with jpackage does not work if the current directory from which it is launched is not the same directory where the app is located.

      Example, if the following is the structure of the app-image created

      C:\Folder\Inside\AnotherFolder\
      |-MyTestApp
        |-MyApp.exe
        |-app\
        | |-MyApp.cfg
        | |-other_jarfiles
        | |-other_resources
        |-runtime\
           |-files_realted_to_runtime
           |- .....
           |- .....

      Launching the application from command line or powershell works.
      C:\Folder\Inside\AnotherFolder\MyTestApp>MyApp.exe

      But Launching it from any other folder with relative path does not work
       C:\Folder\Inside\AnotherFolder>MyTestApp\MyApp.exe
       
       With Java 16 it just comes up in the background and vanishes (Noticed the app for a sec in Task Manager), in Java 18 EA (SOURCE=".:git:1dc8fa9902cf") it gives a pop-up with message "Child process exited with code 4294967295"

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create an app-image with jpackage
      Launch app exe from command line with present working directory other then the directory where the exe is located.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      exe should launch and trigger JVM launch
      ACTUAL -
      JVM not launched, app dies silently

      FREQUENCY : always


        Attachments

        1. MenuTestFrame.java
          1 kB
        2. pic1.png
          pic1.png
          50 kB
        3. pic2.png
          pic2.png
          58 kB

          Activity

            People

            Assignee:
            adev ANUPAM DEV
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: