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

[macos]: App names containing '.' characters results in an error message when launching

    XMLWordPrintable

Details

    • b17
    • x86_64
    • os_x
    • Verified

    Description

      ADDITIONAL SYSTEM INFORMATION :
      macOS: 11.2.3
      java: adoptopenjdk16+36, open jdk-17-ea

      A DESCRIPTION OF THE PROBLEM :
      Launching an application with a '.' character in the app name results in an error message. E.g using the name "hello.world" results in the following line when running the app ./hello.world.app/Contents/MacOS/hello.world:

          Error opening ".../hello.world.app/Contents/app/hello.cfg" file: No such file or directory

      Snooping around in the source code, the "createJvmLauncher" method in AppLauncher.cpp suggests that the cfg path is composed by _replacing_ any suffix in the launcher path with ".cfg", when just appending it seems more appropriate.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Use a name with a '.' in the --name parameter when calling jpackage:

          jpackage --type app-image --name hello.world ...

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Launching the resulting application should not result in error messages.
      ACTUAL -
      Launching the resulting application results in an error message:

          Error opening ".../hello.world.app/Contents/app/hello.cfg" file: No such file or directory

      CUSTOMER SUBMITTED WORKAROUND :
      Refrain from using '.' characters in app names.

      FREQUENCY : always


      Attachments

        Issue Links

          Activity

            People

              herrick Andy Herrick (Inactive)
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: