Problems running JavaFX application on Java 1.7u80

偶尔善良 提交于 2019-12-04 15:06:39

If you want to run JavaFx application on Java 1.7, you need to add jfxrt.jar into your classpath manually. In Java 1.8 jfxrt.jar is in the classpath by default. So that's why you got this problem while running it on 1.7.

You should be able to add it via your IDE. You can also use some third party tools like JavaFx Maven Plugin

It turns out I ran into this known bug in NetBeans IDE.

https://netbeans.org/bugzilla/show_bug.cgi?id=239388

It sounds like the path settings is causing the ide to use the Ant script which builds for platform V 1.8 by accident.

I changed the platform for Netbeans itself to be JDK 1.7 and now everything builds fine for 1.7 and runs the JavaFX app 100% using JDK 1.7u80.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!