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

[macos] Running app using relative path causes problems

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 17
    • 15, 16, 17
    • tools
    • b09

      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

            herrick Andy Herrick (Inactive)
            herrick Andy Herrick (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: