question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JFoenix 9.0.0: Unable to load CSS-File directly

See original GitHub issue

I just created a simple Application using Java 9.0.1:

/**
 * @author w.glanzer, 20.12.2017.
 */
public class TestApplication extends Application
{
  @Override
  public void start(Stage primaryStage)
  {
    Scene scene = new Scene(new BorderPane());
    
    // TestApplication.class.getResource("/css/jfoenix-design.css") => NULL
    // ModuleLayer.boot().findModule("com.jfoenix").get().getResourceAsStream("/css/jfoenix-design.css"); => NULL
    String jfoenixCSSPath = TestApplication.class.getResource("/css/jfoenix-design.css").toExternalForm();
    scene.getStylesheets().add(jfoenixCSSPath);
    primaryStage.setScene(scene);
    primaryStage.show();
  }
}

How to load the provided “jfoenix-design.css” correctly? All ways I try returning null. Is it obsolete to add the provided css to my scene?

EDIT: I used the new deployed 9.0.0 from MavenCentral.

My module-info:

module com.github.wglanzer.test {
  requires javafx.base;
  requires javafx.graphics;
  requires com.jfoenix;

  exports com.github.wglanzer.test;
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
jfoenixadmincommented, Dec 21, 2017

not sure yet about the change, however the artifact 9.0.0 is still useful. “jfoenix-deisgn.css” is not used in jfoenix core, it’s just an additional css so you can use material design color naming in your project. You can copy the file and add it to your project manually.

0reactions
jfoenixadmincommented, Aug 14, 2018

we refactored the css files in the latest version of JFoenix, 9.0.6, however not sure if this solved the issue (didn’t test it)

Read more comments on GitHub >

github_iconTop Results From Across the Web

JFoenix 9.0.0: Unable to load CSS-File directly #546 - GitHub
I just created a simple Application using Java 9.0.1: /** * @author w.glanzer, 20.12.2017. */ public class TestApplication extends ...
Read more >
javaFX program not working after changing the scene builder ...
This error: Caused by: java.lang.NoClassDefFoundError: com/sun/javafx/css/parser/CSSParser at de.jensd.fx.glyphs.GlyphIcon.
Read more >
Index (jfoenix 9.0.0 API) - Javadoc.io
Converts the CSS for -fx-button-type items into ButtonType. buttonTypeProperty() - Method in class com.jfoenix.controls.JFXButton. C. cache ...
Read more >
Correct Setup for Developing In Javafx with Jfoenix 9.0.9 - ADocLib
Here we lay out a series of steps for you to follow that will help facilitate the migration of any Maven build to...
Read more >
JFoenix - Bountysource
When I'm trying to import com.sun.javafx.css. ... IllegalAccessError: superclass access check failed: class com.jfoenix.controls.behavior.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found