-
Bug
-
Resolution: Not an Issue
-
P4
-
fx2.0
-
Windows 7 64bit, JRE/JDK 1.6.0_26, JavaFX 2.0 beta SDK 28. Jun, Eclipse 3.7 IDE, Maven 3.0.3
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.
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.
- duplicates
-
JDK-8119213 Can't use css stylesheet in unsigned Applet or JNLP
- Closed