<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p><span style="font-family: "Arial"; font-size: 18.0px;">Hello,</span></p>
    <p>
    </p>
    <p>
      <span style="font-family: "Arial"; font-size: 18.0px;">I
        spent a few hours while debugging my JavaFX v.24 home
        application and I'd like to share my finding.</span></p>
    <p>
      <span style="font-family: "Arial"; font-size: 18.0px;">In
        my application I accidentally set bad value in method
        "setInitialDirectory" of the JavaFX class
        "javafx.stage.FileChooser".</span></p>
    <p>
      <span style="font-family: "Arial"; font-size: 18.0px;">First
        time my app was pointing on directory what does not exist.
        Another time it did it on nonexistent Windows drive.</span></p>
    <p>
      <span style="font-family: "Arial"; font-size: 18.0px;">When
        it called method "showSaveDialog" it got exception
        "java.lang.IllegalArgumentException: Folder parameter must be a
        valid folder".</span></p>
    <p>
      <span style="font-family: "Arial"; font-size: 18.0px;">The
        exception is not documented and does not say what parameter is
        incorrect and what is wrong with it.</span></p>
    <p>
      <span style="font-family: "Arial"; font-size: 18.0px;">It
        would be nice to have the exception documented and it better say
        something like "setInitialDirectory parameter points on
        nonexistent folder or drive".</span></p>
    <p>
      <span style="font-family: "Arial"; font-size: 18.0px;">Interesting
        that it didn't get exception while pointing on not accessible
        directory and "showSaveDialog" showed content of some other
        directory. For example with "setInitialDirectory" setting
        "C:\\Documents and Settings" it showed content of directory
        "C:\Users".</span></p>
    <p>
    </p>
    <p>
      <span style="font-family: "Arial"; font-size: 18.0px;">Thanks,</span></p>
    <p>
      <span style="font-family: "Arial"; font-size: 18.0px;">Alex</span></p>
    <p>
    </p>
    <p>
      <span style="font-family: "Arial"; font-size: 18.0px;">P.S.
        I pushed my test JavaFX application on GitHub
        <a class="moz-txt-link-freetext" href="https://github.com/OlexYarm/JavaFx-test-FileChooser">https://github.com/OlexYarm/JavaFx-test-FileChooser</a></span></p>
    <p>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
  </body>
</html>