Intellij not recognzing Javafx imports
已回答
I am using Intellij idea, trying to run a java fx project but it does not recognize any of the imports. If i make a new javafx project, everything is fine. But when i want to run this Java fx project i got from the internet, it just does not recognize the java fx imports. Im running oracle jdk 22.0.2. Im very much at a loss over here. Any help would be appreciated. I'll attach some screenshots below:
请先登录再写评论。
JavaFX was removed from the JDK since JDK 11. It became a separate project - OpenJFX: https://openjfx.io/
In order to use JavaFX with versions 11+ of the JDK, you need to:
lib
subfolder as a sourceAlternatively, you can use Java 8 with the JavaFX libraries already present.