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

[macosx] javafx.stage.FileChooser().setInitialDirectory(file) not working

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 8u40
    • javafx

      FULL PRODUCT VERSION :
      8u60b25
      8u40


      ADDITIONAL OS VERSION INFORMATION :
      10.10.4 (14E46)

      A DESCRIPTION OF THE PROBLEM :
      The initialDirectory is ignored when using FileChooser
      FileChooser opens with the last used directory, regardless what value is set for initialDirectory

      However DirectoryChooser takes initialDirectory into account and works as expected.

      Tested with Java 8u40 and 8u50b25 under Mac OSX.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      FileChooser fileChooser = new FileChooser();
              String userDirectoryString = System.getProperty("user.home");
      File userDirectory = new File(userDirectoryString);
              fileChooser.setInitialDirectory(userDirectory);

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      FileChooser should open with user.home as current directory
      ACTUAL -
      FileChooser opens with the last used directory

      REPRODUCIBILITY :
      This bug can be reproduced always.

            morris Morris Meyer (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: