Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8113928

CSS Stylesheet not found when starting via Java Web Start

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: fx2.0
    • Fix Version/s: fx2.1
    • Component/s: javafx
    • Labels:
    • Environment:

      Windows 7 64bit, JRE/JDK 1.6.0_26, JavaFX 2.0 beta SDK 28. Jun, Eclipse 3.7 IDE, Maven 3.0.3

      Description

      When running my mavenized JavaFX application directly drom eclipse IDE my stylesheet is loaded correctly:

      mystage.getScene().getStylesheets().add("/css/main.css");

      My folder structur:
       + src/main/java
          - /myapp/Main.java
       + src/main/resources
          - /css/main.css

      But after packaging my project via maven to .jar and .jnlp and running it, the stylesheet is not loaded anymore.
      Console:
      WARNING: com.sun.javafx.css.StyleManager$2 run Resource "null" not found.

      The jar folder structure:
       + myapp/Main.class
       + css/main.css

      But if I put the main.css to C:\ and then use .add("file:/c:/main.css"); it works fine.

      Seem to be a path resolution problem in the StyleManager.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dgrieve David Grieve
              Reporter:
              aliebelt Andreas Liebelt
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported: