Java中没有javafx.application.Application包 [英] Don't have javafx.application.Application package in java

查看:1198
本文介绍了Java中没有javafx.application.Application包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编写扩展 Application java类.但是,当我搜索 javafx.application.Application 时,它没有出现.即使更新了 JDK ,也无法解决此错误.
有人可以指导我解决此问题吗?

I am trying to write java class which extends Application. But, it is not appearing when I search for javafx.application.Application. Could not fix this error even after updating JDK.
Can somebody guide me to fix this?

推荐答案

如果您使用的是Windows,并且安装了Java 8,但仍无法正常工作,则可以将jar文件添加到项目中.

If you are on Windows, and you have Java 8, and it still does not work, you can just add the jar file to the project.

在您的JDK文件夹中的/jre/lib下,有一个名为 jfxrt.jar 的jar.因此,在Windows上,完整路径为(类似):
C:\ Program Files \ Java \ jdk ... \ jre \ lib \ jfxrt.jar

In your JDK folder, under /jre/lib, there is a jar called jfxrt.jar.
So, on Windows, the full path is (something like):
C:\Program Files\Java\jdk...\jre\lib\jfxrt.jar

这篇关于Java中没有javafx.application.Application包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆