JavaFX in intellij

Asked by At

I want to run a code that uses JavaFX in IntelliJ 2019, every time I try to run it shows an error:

Error: Could not find or load main class Main Caused by: java.lang.NoClassDefFoundError: javafx/application/Application

How can I solve this problem? I am using JDK 12.0.1

1 Answers

Jamith Nimantha On

Java FX is no longer packaged with the Java runtime after JDK 10. You must download and package the Jar with JavaFX runtime, see in order to learn how best to get this up and running.