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

Desktop.getDesktop().browseFileDirectory(file) throws UnsupportedOperationException on Windows 10

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 9, 10, 11, 13, 14
    • Fix Version/s: tbd
    • Component/s: client-libs
    • Labels:
    • Environment:

      Java version info:

      JVM : OpenJDK 64-Bit Server VM
      VM Version : 11.0.4-BellSoft+10
      VM Vendor : BellSoft
      RE Version : 11.0.4-BellSoft
      OS : Windows 10 10.0, amd64

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_10

      Description

      For an existing file,

      java.awt.Desktop.getDesktop().browseFileDirectory(file);

      throws an UnsupportedOperationException on Windows 10.

      Stacktrace:

      java.lang.UnsupportedOperationException: The BROWSE_FILE_DIR action is not supported on the current platform!
      at java.desktop/java.awt.Desktop.checkActionSupport(Desktop.java:380)
      at java.desktop/java.awt.Desktop.browseFileDirectory(Desktop.java:1000)

      This is somewhat surprising, as Windows 10 is not an exotic platform that does not support file browsing (via its File Explorer).

      See also comment of https://stackoverflow.com/a/51017185/942774

        Attachments

          Activity

            People

            • Assignee:
              serb Sergey Bylokhov
              Reporter:
              hschreiber Hendrik Schreiber
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: