B4J Question jMetro Style CSS

vfafou

Well-Known Member
Licensed User
Longtime User
Hello!
I'm using the jMetro style CSS as described here:
It's working perfectly but when I try to run the standalone package made with embeded packager, I have the following error:
B4X:
Oct 31, 2021 9:59:14 PM javafx.scene.control.Control loadSkinClass
ERROR: Failed to load skin 'impl.jfxtras.styles.jmetro.TextFieldSkin' for control TextField@5bc410f[styleClass=text-input text-field]
java.lang.IllegalAccessException: class javafx.scene.control.Control (in module javafx.controls) cannot access class impl.jfxtras.styles.jmetro.TextFieldSkin (in module b4j) because module b4j does not export impl.jfxtras.styles.jmetro to module javafx.controls
        at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Unknown Source)
        at java.base/java.lang.reflect.AccessibleObject.checkAccess(Unknown Source)
        at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
        at javafx.controls/javafx.scene.control.Control.loadSkinClass(Unknown Source)
        at javafx.controls/javafx.scene.control.Control$5.invalidated(Unknown Source)
        at javafx.base/javafx.beans.property.StringPropertyBase.markInvalid(Unknown Source)
        at javafx.base/javafx.beans.property.StringPropertyBase.set(Unknown Source)
        at javafx.graphics/javafx.css.StyleableStringProperty.set(Unknown Source)
        at javafx.controls/javafx.scene.control.Control$5.set(Unknown Source)
        at javafx.graphics/javafx.css.StyleableStringProperty.applyStyle(Unknown Source)
        at javafx.graphics/javafx.css.StyleableStringProperty.applyStyle(Unknown Source)
        at javafx.graphics/javafx.scene.CssStyleHelper.transitionToState(Unknown Source)
        at javafx.graphics/javafx.scene.Node.doProcessCSS(Unknown Source)
        at javafx.graphics/javafx.scene.Node.access$900(Unknown Source)
        at javafx.graphics/javafx.scene.Node$1.doProcessCSS(Unknown Source)
        at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSSImpl(Unknown Source)
        at javafx.graphics/com.sun.javafx.scene.ParentHelper.superProcessCSSImpl(Unknown Source)
        at javafx.graphics/com.sun.javafx.scene.ParentHelper.superProcessCSS(Unknown Source)
        at javafx.graphics/javafx.scene.Parent.doProcessCSS(Unknown Source)
        at javafx.graphics/javafx.scene.Parent.access$400(Unknown Source)
        at javafx.graphics/javafx.scene.Parent$1.doProcessCSS(Unknown Source)
        at javafx.graphics/com.sun.javafx.scene.ParentHelper.processCSSImpl(Unknown Source)
        at javafx.controls/com.sun.javafx.scene.control.ControlHelper.superProcessCSSImpl(Unknown Source)
        at javafx.controls/com.sun.javafx.scene.control.ControlHelper.superProcessCSS(Unknown Source)
        at javafx.controls/javafx.scene.control.Control.doProcessCSS(Unknown Source)
        at javafx.controls/javafx.scene.control.Control.access$000(Unknown Source)
        at javafx.controls/javafx.scene.control.Control$1.doProcessCSS(Unknown Source)
        at javafx.controls/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(Unknown Source)
        at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(Unknown Source)
        at javafx.graphics/javafx.scene.Parent.doProcessCSS(Unknown Source)
        at javafx.graphics/javafx.scene.Parent.access$400(Unknown Source)
        at javafx.graphics/javafx.scene.Parent$1.doProcessCSS(Unknown Source)
        at javafx.graphics/com.sun.javafx.scene.ParentHelper.processCSSImpl(Unknown Source)
        at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(Unknown Source)
        at javafx.graphics/javafx.scene.Parent.doProcessCSS(Unknown Source)
        at javafx.graphics/javafx.scene.Parent.access$400(Unknown Source)
        at javafx.graphics/javafx.scene.Parent$1.doProcessCSS(Unknown Source)
        at javafx.graphics/com.sun.javafx.scene.ParentHelper.processCSSImpl(Unknown Source)
        at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(Unknown Source)
        at javafx.graphics/javafx.scene.Parent.doProcessCSS(Unknown Source)
        at javafx.graphics/javafx.scene.Parent.access$400(Unknown Source)
        at javafx.graphics/javafx.scene.Parent$1.doProcessCSS(Unknown Source)
        at javafx.graphics/com.sun.javafx.scene.ParentHelper.processCSSImpl(Unknown Source)
        at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(Unknown Source)
        at javafx.graphics/javafx.scene.Parent.doProcessCSS(Unknown Source)
        at javafx.graphics/javafx.scene.Parent.access$400(Unknown Source)
        at javafx.graphics/javafx.scene.Parent$1.doProcessCSS(Unknown Source)
        at javafx.graphics/com.sun.javafx.scene.ParentHelper.processCSSImpl(Unknown Source)
        at javafx.controls/com.sun.javafx.scene.control.ControlHelper.superProcessCSSImpl(Unknown Source)
        at javafx.controls/com.sun.javafx.scene.control.ControlHelper.superProcessCSS(Unknown Source)
        at javafx.controls/javafx.scene.control.Control.doProcessCSS(Unknown Source)
        at javafx.controls/javafx.scene.control.Control.access$000(Unknown Source)
        at javafx.controls/javafx.scene.control.Control$1.doProcessCSS(Unknown Source)
        at javafx.controls/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(Unknown Source)
        at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(Unknown Source)
        at javafx.graphics/javafx.scene.Parent.doProcessCSS(Unknown Source)
        at javafx.graphics/javafx.scene.Parent.access$400(Unknown Source)
        at javafx.graphics/javafx.scene.Parent$1.doProcessCSS(Unknown Source)
        at javafx.graphics/com.sun.javafx.scene.ParentHelper.processCSSImpl(Unknown Source)
        at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(Unknown Source)
        at javafx.graphics/javafx.scene.Node.processCSS(Unknown Source)
        at javafx.graphics/javafx.scene.Scene.doCSSPass(Unknown Source)
        at javafx.graphics/javafx.scene.Scene.preferredSize(Unknown Source)
        at javafx.graphics/javafx.scene.Scene$2.preferredSize(Unknown Source)
        at javafx.graphics/com.sun.javafx.scene.SceneHelper.preferredSize(Unknown Source)
        at javafx.graphics/javafx.stage.Window$12.invalidated(Unknown Source)
        at javafx.base/javafx.beans.property.BooleanPropertyBase.markInvalid(Unknown Source)
        at javafx.base/javafx.beans.property.BooleanPropertyBase.set(Unknown Source)
        at javafx.graphics/javafx.stage.Window.setShowing(Unknown Source)
        at javafx.graphics/javafx.stage.Window.show(Unknown Source)
        at javafx.graphics/javafx.stage.Stage.show(Unknown Source)
        at b4j/anywheresoftware.b4j.objects.Form.Show(Unknown Source)
        at b4j/com.vf.zooland.b4xpagesmanager._showpageimpl(Unknown Source)
        at b4j/com.vf.zooland.b4xpagesmanager._showpage(Unknown Source)
        at b4j/com.vf.zooland.b4xpagesmanager._addpage(Unknown Source)
        at b4j/com.vf.zooland.b4xpagesmanager._addpageandcreate(Unknown Source)
        at b4j/com.vf.zooland.b4xpagesmanager._initialize(Unknown Source)
        at b4j/com.vf.zooland.main._appstart(Unknown Source)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at b4j/anywheresoftware.b4a.BA.raiseEvent2(Unknown Source)
        at b4j/anywheresoftware.b4a.BA.raiseEvent(Unknown Source)
        at b4j/com.vf.zooland.main.start(Unknown Source)
        at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(Unknown Source)
        at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(Unknown Source)
        at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
        at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
        at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)
When I run the app in release or debug mode inside B4J, it is running perfectly!
What could I do?
Thank you in advance!
 
Last edited:

vfafou

Well-Known Member
Licensed User
Longtime User
Hello Erel!
Thank you for your response!
I have attached my project. The problem is that when I try to run the executable, nothing happens. Then I run the run_debug.bat in ..\ExampleMetroStyle\B4J\Objects\temp\build and I take the error you see at my previous post! I have attached the latest jMetro library too!
 

Attachments

  • ZooLand.zip
    305.7 KB · Views: 58
  • jmetro-11.6.15.jar
    83.8 KB · Views: 54
Upvote 0
Top