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

Win: DirectoryChooser throws COM exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • 7-pool
    • 7u6
    • javafx
    • None
    • I'm using Win7x64, JavaFX 2.x, Netbeans 7.1.2, Scene Builder, FXML

      I'm using the DirectoryChooser in my java controller class like this:

      DirectoryChooser chooser = new DirectoryChooser();
              chooser.setTitle("Select a Music folder");
              chooser.setInitialDirectory( new File(System.getProperty("user.home")));
              File selectedDirectory = chooser.showDialog(mainAnchorPane.getScene().getWindow());



      This works great for everything......except when I select a folder like "Music" from the left hand pane explorer. In this case, the last line in the code above gives me a very odd exception in my output window:

      Error:80070057 in pFile->GetDisplayName(SIGDN_FILESYSPATH, &path)
      COM Error:80070057 The parameter is incorrect.

            anthony Anthony Petrov (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: