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

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

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • P4
    • tbd
    • 9, 10, 11, 13, 14
    • client-libs
    • 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

    • x86
    • 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

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hschreiber Hendrik Schreiber
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: