2 Replies Latest reply on Dec 21, 2012 11:02 PM by 630114

    Conflict between SceneBuilder and StyleManager with stylesheet url

      When referencing a style sheet within the fxml from the root of the classpath as follows:

      <URL value="@/app/scenes/app.css" />

      The StyleManager can load it when the fxml loader loads it. But the SceneBuilder 1.1 preview throws an IllegalStateException when trying to open the .fxml file.

      When adding the stylesheet with the SceneBuilder it adds the relative link to the stylesheet as follows:

      <URL value="@../app.css" />

      When loading the css file during the fxml load, the StyleManager throws an exception that the stylesheet cannot be found. The development is being done in netbeans 7.2 which builds a jar for the app and the stylesheet is being loaded from the jar:

      INFO: com.sun.javafx.css.StyleManager loadStylesheetUnPrivileged Could not find stylesheet: jar:file:/C:/Dev/stuff/app/dist/App.jar!/app.css

      so it is trying to load it relative from the root of jar classpath rather than relative to the fxml files location.