0

I'm using Intellij Idea to code in Java on MacOS. I installed the JDK Java 11 downloaded on the official website. Java work perfectly. But, now i want to use the JavaFX library.

So I imported JavaFX using : import javafx.*;

But I get the error : Cannot resolve symbol 'javafx'.

So I search a litle and figured out that I had to create the project as a "JavaFX Application" so I did but in the file sample.fxml I get the message :

The JavaFX runtime is not configured. Either use a JDK that has the JavaFX built in, or add a JavaFX library to the classpath

When I search for download the JavaFX library, i found that it is include in the JavaJDK now but I can't find it...

So I would like to find a way to use JavaFX and also without IntellijIdea (by using javac & java on terminal).

  • Possible duplicate of [cannot resolve symbol javafx.application in IntelliJ Idea IDE](https://stackoverflow.com/questions/27178895/cannot-resolve-symbol-javafx-application-in-intellij-idea-ide) – Hovercraft Full Of Eels Jan 20 '19 at 17:58
  • The best resource to get started with JavaFX 11 is [here](https://openjfx.io/openjfx-docs/#IDE-Intellij), and you can also check this [question](https://stackoverflow.com/questions/52467561/intellij-cant-recognize-javafx-11-with-openjdk-11). @HovercraftFullOfEels the linked answer doesn't really apply. – José Pereda Jan 20 '19 at 19:01

1 Answers1

-1

From Java 11, JavaFX is no longer bundled with the JDK. You'll need to get it separately as JavaFX 11 from here.

You can read more from this post published on InfoWorld.

shawon13
  • 79
  • 9