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

[macos] Running app using relative path causes problems

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 15, 16, 17
    • Fix Version/s: 17
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b09

      Description

      This is Strange:
      1.) I create a simple application called "Simple Test" using just "jpackage --type app-image --name "Simple Test" ... "
      If I cd to "Simple Test.app" in the output directory and run command:
      "Contents/MacOS/Simple Test" it runs fine.
      2.) but if I cd to "Simple Test.app/Contents/MacOS: and just run "./Simple Test" I get the error:
      Error opening ".../Simple Test.app/Contents/Contents/app/Simple Test.cfg"

      3.) This problem originally reported in email:
      After building with jdk15's jpackage the app fails to launch. The following appears in the system.log:

      Jan 22 08:58:03 dharma com.apple.xpc.launchd[1] (org.mbari.vars.ui.101792[34511]): Service exited with abnormal code: 1

      I launched the jlink built app and confirmed it runs as expected using:

      cd "VARS Annotation.app/Contents/runtime/Contents/Home/bin"
      ./VARS\ Annotation

      I attempted to run the jpackage built executable on the command line using:

      cd "VARS Annotation.app/Contents/MacOS"
      ./VARS\ Annotation

      It fails with the following message:

      Error opening "[...]/VARS Annotation.app/Contents/Contents/app/VARS Annotation.cfg" file: No such

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              herrick Andy Herrick
              Reporter:
              herrick Andy Herrick
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: