Jfoenix library does not list Jfxbuttons after added

Asked

Viewed 435 times

2

I have a problem, and I’m here to see if anyone can help me solve it. I installed the Jfoenix library in my Scenebuilder to work alongside the Netbeans IDE but after the library is imported into Scenebuilder as they show it should be done on the site, only a few JFX work, others like Jfxbutton, Jfxcombobox, Jfxcheckbox, are not listed for use by looking at the Scenebuilder Log displays the following information:

Exception for: com/jfoenix/Controls/Jfxbutton.class java.io.Ioexception: java.lang.Noclassdeffounderror: com/sun/javafx/css/Styleconverterimpl at com.oracle.javafx.scenebuilder.kit.library.util.JarExplorer.instantiateWithFXMLLoader(Jarexplorer.java:114) at com.oracle.javafx.scenebuilder.kit.library.util.JarExplorer.exploreEntry(Jarexplorer.java:160) at com.oracle.javafx.scenebuilder.kit.library.util.JarExplorer.explore(Jarexplorer.java:70) at com.oracle.javafx.scenebuilder.kit.library.user.LibraryFolderWatcher.exploreAndUpdateLibrary(Libraryfolderwatcher.java:325) at com.oracle.javafx.scenebuilder.kit.library.user.LibraryFolderWatcher.runDiscovery(Libraryfolderwatcher.java:138) at com.oracle.javafx.scenebuilder.kit.library.user.LibraryFolderWatcher.run(Libraryfolderwatcher.java:92) at java.base/java.lang.Thread.run(Thread.java:844) Caused by: java.lang.Noclassdeffounderror: com/sun/javafx/css/Styleconverterimpl at java.base/java.lang.Classloader.defineClass1(Native Method) at java.base/java.lang.Classloader.defineClass(Classloader.java:1007) at java.base/java.security.Secureclassloader.defineClass(Secureclassloader.java:174) at java.base/java.net.Urlclassloader.defineClass(Urlclassloader.java:545) at java.base/java.net.Urlclassloader.access$100(Urlclassloader.java:83) at java.base/java.net.Urlclassloader$1.run(Urlclassloader.java:453) at java.base/java.net.Urlclassloader$1.run(Urlclassloader.java:447) at java.base/java.security.Accesscontroller.doPrivileged(Native Method) at java.base/java.net.Urlclassloader.findClass(Urlclassloader.java:446) at java.base/java.lang.Classloader.loadClass(Classloader.java:563) at java.base/java.lang.Classloader.loadClass(Classloader.java:496) at com.jfoenix.Controls.Jfxbutton$Styleableproperties.(Jfxbutton.java:175) at com.jfoenix.Controls.JFXButton.(Jfxbutton.java:155) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Nativeconstructoraccessorimpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Delegatingconstructoraccessorimpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488) at java.base/java.lang.Class.newInstance(Class.java:558) at javafx.fxml/javafx.fxml.Fxmlloader$Instancedeclarationelement.constructValue(Fxmlloader.java:1019) at javafx.fxml/javafx.fxml.Fxmlloader$Valueelement.processStartElement(Fxmlloader.java:754) at javafx.fxml/javafx.fxml.Fxmlloader.processStartElement(Fxmlloader.java:2722) javafx.fxml/javafx.fxml.Fxmlloader.loadImpl(Fxmlloader.java:2552) at javafx.fxml/javafx.fxml.Fxmlloader.load(Fxmlloader.java:2450) at com.oracle.javafx.scenebuilder.kit.library.util.JarExplorer.instantiateWithFXMLLoader(Jarexplorer.java:110) ... 6 more Caused by: java.lang.Classnotfoundexception: com.sun.javafx.css.Styleconverterimpl at java.base/java.net.Urlclassloader.findClass(Urlclassloader.java:466) at java.base/java.lang.Classloader.loadClass(Classloader.java:563) at java.base/java.lang.Classloader.loadClass(Classloader.java:496) ... 30 more

2 answers

0

Make sure that you are using the correct version of Jfoenix, as Scene Builder has version for jdk 8 and jdk 11, and in this case if you download a version of Jfoenix other than the version of your Scene Builder, there will be library compatibility issues.

Also check that your jdk version matches one of these two. if your jdk is in version 8 Scene Builder should also use this version, as well as the Jfoenix library.

Links to correct library installation with jdk8:

Scene Builder windowns 64bits: https://gluonhq.com/products/scene-builder/thanks/? dl=/download/Scene-Builder-windows-x64/?

Jfoenix 8.x. x: https://search.maven.org/remotecontent?filepath=com/jfoenix/jfoenix/8.0.8/jfoenix-8.0.8.jar?

0

Step 1: Add jfoenix.jar to your classpath by clicking Library > Add Jar/Folder. (As the components appear in your Scenebuilder you can skip the next step if you want)

Step 2: In your Scenebuilder also add it only as follows:

inserir a descrição da imagem aqui

In the following window click on Add Library/FXML from file system and select the jar again.

After doing this I got the result below:

inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.