title: opening a javafx FileChooser in the user directory
body: <p>I am trying to open a javafx FileChooser in the user directory according to an example I found <a href="http://blueskyworkshop.com/topics/Java-Pages/java-text-viewer/" rel="nofollow">here</a>.</p>
  
  <p>Here is a fragment of the simple code I am using:</p>
  
  <pre><code>FileChooser fc = new FileChooser();
  fc.setTitle("Open Dialog");
  String currentDir = System.getProperty("user.dir") + File.separator;
  file = new File(currentDir);
  fc.setInitialDirectory(file);
  </code></pre>
  
  <p>However, I keep obtaining this warning (complete file paths have been truncated):</p>
  
  <pre><code>Invalid URL passed to an open/save panel: '/Users/my_user'.  Using 'file://localhost/Users/my_user/&lt;etc&gt;/' instead.
  </code></pre>
  
  <p>I verified that the <code>file</code> object is an existing directory adding these lines:</p>
  
  <pre><code>System.out.println(file.exists()); //true
  System.out.println(file.isDirectory()); //true
  </code></pre>
  
  <p>Then I do not have idea why I am obtaining the warning message.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>This seems to be a bug in JavaFX: <a href="https://bugs.openjdk.java.net/browse/JDK-8098160" rel="nofollow">https://bugs.openjdk.java.net/browse/JDK-8098160</a>
  (you need to create a free Jira account to see the bug report).
  This problem happens in OSX, no idea about other platforms.</p>