title: JavaFX Directory Chooser - How to get the path from directory?
body: <p>I would like to get the path from an Directory with the DirectoryChooser. My code looks like that:</p>
  
  <pre><code>DirectoryChooser dc = new DirectoryChooser();
  dc.showDialog(stage);
  File f = dc.getInitialDirectory();
  String s = f.getAbsolutePath();
  System.out.println(s);
  </code></pre>
  
  <p>But that doesn't work, can somebody help me? The method getInitialDirectory() is always null</p>