Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

java.lang.ClassNotFoundException: com.sun.javafx.tk.quantum.QuantumToolkit #157

Open
damnms opened this issue Sep 30, 2023 · 0 comments
Open

Comments

@damnms
Copy link

damnms commented Sep 30, 2023

i have an application (https://gitlab.com/olze/chatclient) that i'd like to move to a native image. the build works but when i execute it, i get an error:

oli@DESKTOP-SJIB21T:~/IdeaProjects/chatclient/build/native/nativeCompile$ ./chatclient 
Sept. 30, 2023 8:12:15 AM com.sun.javafx.application.PlatformImpl startup
WARNUNG: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @10bdf5e5'
java.lang.ClassNotFoundException: com.sun.javafx.tk.quantum.QuantumToolkit
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.ClassForNameSupport.forName(ClassForNameSupport.java:122)
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.ClassForNameSupport.forName(ClassForNameSupport.java:86)
	at java.base@21/java.lang.Class.forName(DynamicHub.java:1346)
	at java.base@21/java.lang.Class.forName(DynamicHub.java:1335)
	at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:253)
	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:290)
	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:162)
	at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:651)
	at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:671)
	at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196)
	at java.base@21/java.lang.Thread.runWith(Thread.java:1596)
	at java.base@21/java.lang.Thread.run(Thread.java:1583)
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:833)
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:211)
Exception in thread "main" java.lang.RuntimeException: No toolkit found
	at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:275)
	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:290)
	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:162)
	at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:651)
	at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:671)
	at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196)
	at java.base@21/java.lang.Thread.runWith(Thread.java:1596)
	at java.base@21/java.lang.Thread.run(Thread.java:1583)
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:833)
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:211)

as i am not sure which component is responsible for (javafx, graalvm, gradle javafx plugin), i thought i reference it here.
the other bug is here: oracle/graal#7521

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant