title: Dynamically add CSS stylesheets in JavaFX
body: <p>I would like to add a CSS file which is located somewhere on the filesystem.
  The purpose is to write an application where the user can add JavaFX CSS files (which are created by anyone and located anywhere) dynamically.<br>
  I tried something like that, only for testing, to see if dynamically added CSS files works:</p>
  
  <pre><code>public class Main extends Application {
  
      @Override
      public void start(Stage primaryStage) throws Exception{
          Label label = new Label("Hello");
          Scene scene = new Scene(label);
  
          //file would be set by an file chosser
          File file = new File("C:/test.css");
          scene.getStylesheets().add(file.getAbsolutePath());
  
          primaryStage.setTitle("Title");
          primaryStage.setScene(scene);
          primaryStage.show();
      }
  
  
      public static void main(String[] args) {
          launch(args);
      }
  }
  </code></pre>
  
  <p>But I get always the same error:</p>
  
  <pre class="lang-none prettyprint-override"><code>WARNING: com.sun.javafx.css.StyleManager loadStylesheetUnPrivileged Resource "C:\test.css" not found. 
  </code></pre>
  
  <p>How can I fix it?</p>