JFoenix
JFoenix copied to clipboard
Exceptions throw when trying to use JFXTextField in Scenebuilder 16
Trying to use in scenebuilder and the jar analysis report includes this:
Exception for: com/jfoenix/controls/FakeFocusJFXTextField.class
javafx.fxml.LoadException:
unknown path:2
at javafx.fxml/javafx.fxml.FXMLLoader.constructLoadException(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader$InstanceDeclarationElement.constructValue(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader$ValueElement.processStartElement(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.processStartElement(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.load(Unknown Source)
at com.oracle.javafx.scenebuilder.kit.library.util.ExplorerBase.instantiateWithFXMLLoader(ExplorerBase.java:56)
at com.oracle.javafx.scenebuilder.kit.library.util.ExplorerBase.exploreEntry(ExplorerBase.java:111)
at com.oracle.javafx.scenebuilder.kit.library.util.JarExplorer.exploreEntry(JarExplorer.java:83)
at com.oracle.javafx.scenebuilder.kit.library.util.JarExplorer.explore(JarExplorer.java:65)
at com.oracle.javafx.scenebuilder.kit.library.user.LibraryFolderWatcher.exploreAndUpdateLibrary(LibraryFolderWatcher.java:367)
at com.oracle.javafx.scenebuilder.kit.library.user.LibraryFolderWatcher.runDiscovery(LibraryFolderWatcher.java:155)
at com.oracle.javafx.scenebuilder.kit.library.user.LibraryFolderWatcher.run(LibraryFolderWatcher.java:100)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalAccessException: class javafx.fxml.FXMLLoader$InstanceDeclarationElement (in module javafx.fxml) cannot access a member of class com.jfoenix.controls.FakeFocusJFXTextField with modifiers ""
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.newInstanceWithCaller(Unknown Source)
at java.base/java.lang.reflect.ReflectAccess.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(Unknown Source)
at java.base/java.lang.Class.newInstance(Unknown Source)
... 13 more
Not a fix but helps maybe: I had other problems using Scene Builder 16 and switched back to 15.
This is a problem with scenebuilder, you have to downgrade.
What I tend to do when SceneBuilder doesn't support a custom component is create and initialize those components in code instead of FXML... not ideal but it does let you continue to use SB for other stuff.
Sometimes, SB is missing a library for a custom component. I think SB cannot resolve dependencies. My SOP is:
- Make sure a zero-argument-constructor exists
- Check any static and default constructor lines against uncommon objects
Edit: But as I wrote above this is a different problem. For this thread, a SB downgrade should to the job.