sshahine / JFoenix

JavaFX Material Design Library
MIT License
6.27k stars 1.05k forks source link

Problems with Java11 #1221

Open Philipp0205 opened 2 years ago

Philipp0205 commented 2 years ago

Hello,

we update the Java Version of our Project from 8 to 11. This class seems to be missing: com.sun.javafx.css.converters.SizeConverter.

How can I fix this? Thanks!

11.0.12+7-LTS
10:29:24.172 [JavaFX Application Thread] INFO de.porsche.harcon.controller.AbstractFxmlConfiguration - DerivedXMLName: TitleScreenController.fxml
Exception in Application start method
java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:465)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:364)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.RuntimeException: Exception in Application start method
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:901)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: javafx.fxml.LoadException: 
unknown path:14

    at javafx.fxml/javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2707)
    at javafx.fxml/javafx.fxml.FXMLLoader$InstanceDeclarationElement.constructValue(FXMLLoader.java:1022)
    at javafx.fxml/javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:757)
    at javafx.fxml/javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2808)
    at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2634)
    at javafx.fxml/javafx.fxml.FXMLLoader.load(FXMLLoader.java:2532)
    at de.porsche.harcon.controller.AbstractFxmlConfiguration.loadController(AbstractFxmlConfiguration.java:59)
    at de.porsche.harcon.Main$TitleScreenLoader.titleScreenController(Main.java:40)
    at de.porsche.harcon.Main.start(Main.java:58)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:847)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:483)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
    at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:179)
    ... 1 more
Caused by: java.lang.reflect.InvocationTargetException
    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:490)
    at javafx.fxml/javafx.fxml.FXMLLoader$InstanceDeclarationElement.constructValue(FXMLLoader.java:1020)
    ... 16 more
Caused by: java.lang.NoClassDefFoundError: com/sun/javafx/css/converters/SizeConverter
    at com.jfoenix.controls.JFXSpinner$StyleableProperties.<clinit>(JFXSpinner.java:132)
    at com.jfoenix.controls.JFXSpinner.<init>(JFXSpinner.java:92)
    at com.jfoenix.controls.JFXSpinner.<init>(JFXSpinner.java:49)
    ... 21 more
Caused by: java.lang.ClassNotFoundException: com.sun.javafx.css.converters.SizeConverter
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    ... 24 more
Exception running application de.porsche.harcon.Main
elegantShock2258 commented 2 years ago

can you share your .fxml? do you have javafx11 here ( this is a common problem) , have you imported jfoenix using maven or jar or some other package manager?

Philipp0205 commented 2 years ago

I used maven to import the Java 9+ Version of JFoenix. Is there a common fix?

RocketMaDev commented 2 years ago

Oh, have you downloaded JavaFX lib? Please notice that jfx is not included in jre.