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

jpackage associations fail when there are spaces in file name or path

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 14
    • Fix Version/s: 15
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Introduced In Version:
      14
    • Resolved In Build:
      b02

      Description

      user reported:
      I tried to use jpackage file-associations option to associate a given
      extension. This works fine. The program gets launched with the given
      argument (e.g., double clicking file on Windows).

      I have noticed though that the argument may be split due to possible
      whitespaces in the filename.

      e.g., clicking on file C:\foo.xyz works fine but C:\part1 part2.xyz gets
      broken up into 2 arguments.
      It looks the argument needs to be wrapped in quotes so that a Java program
      gets the right argument:

      ["C:\part1 part2.xyz"]
      instead of
      ["C:\part1", "part2.xyz"]
      as currently reported.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: