Getting 'java.lang.RuntimeException: No toolkit found' error on running javafx application with java11
12,671
It is possible that JDK, which you have installed on your Windows system, doesn't include JavaFX and you should install it externally.
Read more here: Where can I get pre-built JavaFX libraries for OpenJDK (Windows) or https://stackoverflow.com/a/19529820 or Javafx: No toolkit found exception .
Author by
anupm
Updated on June 13, 2022Comments
-
anupm almost 2 years
We recently migrated from java 8 to openJdk11. Now I am trying to test my application on windows and ubuntu with using openJdk installed on both OS. I'm able to run it on ubuntu. But same is not executing in windows10 with java11.Error_Message:
java.lang.RuntimeException: No toolkit found at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:272) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158) at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658) at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195) at java.base/java.lang.Thread.run(Unknown Source)
-
anupm over 5 yearsMy application runs on ubuntu 18 with no error. I have all javafx*.jar files in my classpath. If it runs on ubuntu with same configuration why not here? Do i have to do extra configuration for windows? I downloaded JavaFX sdk using the link you provided above. Could you please tell me how to configure this path?
-
PeMa about 2 yearsThis answer is totally useless.