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

Desktop::browseFileDirectory is not implemented on Windows 10

XMLWordPrintable

    • generic
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      Windows 10 / 11

      A DESCRIPTION OF THE PROBLEM :
      Windows 10 / 11 is arguably the most important Java Desktop platform, and yet some java.awt.Desktop features (i.e. Desktop.Action.BROWSE_FILE_DIR) unexpectedly don't work on Windows. Notably, the Shell32 API does have a SHOpenFolderAndSelectItems function which does what we need.


      I have worked around the Java Desktop API by calling SHOpenFolderAndSelectItems directly via JNA:
      https://stackoverflow.com/a/73093768/1514467


      Note that this RFE is a duplicate of this Bug Report:
      https://bugs.openjdk.org/browse/JDK-8233994


      PS: I will go out on a limb and assume that Desktop::browseFileDirectory is also not implemented for Linux, but that's a matter for another day.


            pnarayanaswa Praveen Narayanaswamy
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: