jpackage: file-associations report wrong argument count

Andy Herrick andy.herrick at oracle.com
Fri Dec 13 15:27:25 UTC 2019


yes - I can see this problem locally on windows and have filed 
JDK-8235915 <https://bugs.openjdk.java.net/browse/JDK-8235915> to 
address it.

/Andy

On 12/13/2019 2:45 AM, Daniel Peintner wrote:
> All,
>
> 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.
>
> Note: This used to work in the case of the "old" javapackager.
>
> Is this a known issue? I did not find a related issue here [1]
>
> Thanks,
>
> -- Daniel
>
> [1] https://bugs.openjdk.java.net/issues/?filter=37667


More information about the core-libs-dev mailing list