How to Fix NoClassDefFoundError in JavaFX?

后端 未结 1 1234
旧巷少年郎
旧巷少年郎 2021-01-29 04:39

I\'m trying to build a small user interface using JavaFX, But I\'m getting an error like this:

Error: Could not find or load main class myApp Caused by:

相关标签:
1条回答
  • 2021-01-29 05:00

    I think JavaFX is not a part of the JDK > 9 any more. (Your version is 12.x.x)

    Probably this could help you: https://openjfx.io/openjfx-docs/#install-javafx

    (Assuming you are using Maven) If this does not help, try to clean and build your Application. Sometimes Maven does not recognize newly added dependencies.

    0 讨论(0)
提交回复
热议问题