I'm building my first app in Java FX. (java.runtime.version=1.8.0_71-b15) Coding in Eclipse Java EE IDE for Web Developers. Version: Mars.2 Release (4.5.2) Build id: 20160218-0600
When I tied in my CSS file, my console started flooding with error messages like these:
Feb 14, 2018 4:13:25 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Could not resolve '-fx-text-base-color' while resolving lookups for '-fx-text-fill' from rule '*.button' in stylesheet jar:file:/Z:/Java/jdk1.8.0_71/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Feb 14, 2018 4:13:25 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Could not resolve '-fx-shadow-highlight-color' while resolving lookups for '-fx-background-color' from rule '*.button' in stylesheet jar:file:/Z:/Java/jdk1.8.0_71/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
This is known bug, which apparently can't be fixed in Java 8 and hopefully will be fixed in Java 9. In the meantime, the best advice that people online seem to offer is to turn off the CSS logging. Here's that very advice from this site (https://bitbucket.org/controlsfx/controlsfx/issues/373/css-warnings-using-propertysheet-control):
I don't know that there is much that can be done - it looks like more of a general purpose JavaFX issue than something ControlsFX related. The visuals do not seem to be impacted, so one option is to simply turn off CSS logging, as such:
com.sun.javafx.Logging.getCSSLogger().setLevel(Level.OFF);
(The issue was also discussed on SO here: Java error on CSS, and elsewhere here: https://community.oracle.com/thread/2496427?tstart=0 but I'm not having any success zeroing in on an actual solution. The only practical advice I can find is from that first post, essentially saying, "Turn off CSS Logging with this command":
com.sun.javafx.Logging.getCSSLogger().setLevel(Level.OFF);
I'm fine with turning off the logging, my question is... how do I use this command? The poster who put up this advice just left the command, didn't say where to put it or anything. He (or she) is speaking in a shorthand I am not following.
Does anyone know where to apply this command? In the CSS file? Or in the actual Java code itself? If so, would "com.sun.javafx.Logging" be... the project path? Or is this a setting in Eclipse?
Many thanks, -RAO