当我按照https://netbeans.org/kb/73/java/javafx-setup.html#create-platform-manual中的步骤进行操作时,我希望我将获得一个JavaFX标签
然而,我从最新的Netbeans 8获得的是
缺少JavaFX标签!
我可以在jfxrt.jar
看到C:\Program Files\Java\jdk1.7.0_51\jre\lib
。我可以做任何解决方法吗?
答案 0 :(得分:1)
我无法告诉你的目标,但我相信JavaFX的功能已经存在。
我使用NetBeans 8.0和JDK 1.7.0_51作为默认平台,我也没有任何JavaFX选项卡,但我能够使用JavaFX项目。我可以加载例如JavaFX的一个示例:DigitalClock。我可以构建并运行它。
您指向的教程是指Netbeans 7.3。前两个笔记中的第二个说:
If you are using NetBeans IDE 7.4, you do not need to set up an "FX-enabled" Java platform in order to utilize JavaFX support in the IDE. You can develop JavaFX projects in the IDE if you install any standard Java platform that is JDK 7 Update 6 or newer (JDK 7 Update 10 or newer is strongly recommended). See NetBeans IDE 7.4 Release Notes for details.
编辑:
这来自NetBeans IDE 8.0 Release Notes
:https://netbeans.org/community/releases/80/relnotes.html#javafx
- The JavaFX SDK is not bundled with the NetBeans IDE 8.0 release.
- The JavaFX 2.2 SDK (and newer) is bundled with the latest JDK 7 for Windows, OS X and Linux. You can install the JavaFX 2.2.51 SDK together with Java SE Development Kit 7u51 as a co-bundled product.
- The JavaFX 8 SDK is bundled with JDK 8 for Windows, OS X and Linux. You can install the JavaFX 8 SDK together with Java SE Development Kit 8 as a co-bundled product.
- Unlike previous versions of NetBeans IDE, NetBeans IDE 8.0 does not require that you set up an "FX-enabled" Java platform in order to utilize JavaFX support in the IDE. You can develop JavaFX projects in the IDE if you install any standard Java platform that is JDK 7 Update 6 or newer (JDK 7 Update 10 or newer is strongly recommended).
答案 1 :(得分:0)
您可以将jfxrt.jar添加为外部jar / lib,这样您就可以使用JavaFX API。在JDK8中,默认包含jfxrt。