2

GTK+ and Qt have xdg-desktop-portal functionality built-in, but it's unclear to me how to implement this functionality in Java.

How would one go about doing this? Are there any examples or packages to simplify implementation?

EDIT: To be specific, I need to be able to open an "open file" or "save as" dialogs, as described in the xdg-desktop-portal README.

Tin Man
  • 700
  • 8
  • 29

1 Answers1

0

Normally, it would be the task of the JDK to provide the necessary integrations with the desktop environment, since it's on a "lower layer" than what you normally need to care about.

That being said, there's been a similar issue that was raised in the flatpak repository for this exact same problem. In that issue and linked pull request, a workaround is specified: by executing xdg-open $YOUR_URI, you can get the same XDG-compliant behaviour.

nielsdg
  • 2,318
  • 1
  • 13
  • 22