Eclipse 无法识别 JavaFX [英] JavaFX is not recognized in Eclipse

查看:36
本文介绍了Eclipse 无法识别 JavaFX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

JavaFX 应该包含在最新版本的 JDK 中.我正在使用 1.7 v 17.导入如下:

JavaFX is supposed to be included with the latest release of the JDK. I'm using 1.7 v 17. Imports like:

import javafx.fxml.Initializable;

不被识别.我宁愿不必手动链接到 jar.

are not recognized. I would prefer not to have to link to the jar manually.

我之前听说这是一个错误,但应该已经修复了.http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7166330

I heard that this was a bug before, but that it should have been fixed. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7166330

有没有人知道如何识别 javafx.我不想让 e(fx)clipe 为我做这件事,也不想链接 jar.据我了解,它现在包含在最新版本的 jdk 中,因此我应该可以像上面那样进行导入,对吗?

Does anyone have an answer on how javafx can be recognized. I don't want to have e(fx)clipe do it for me and I don't want to have to link the jar. As far as I understand, it;s now included in the latest release of the jdk, therefor I should be able to do an import like above right?

推荐答案

JavaFX 不在 JDK7 中的任何默认类路径上 - 请查看已修复该错误的版本!

JavaFX isn't on any of the default classpaths in JDK7 - please see in which version the bug has been fixed!

在 JDK8 中,这是固定的,JavaFX 位于 ExtensionClasspath 上,但您仍然会收到来自 Eclipse 的警告,因为扩展类路径上的内容被视为实现细节 - 您可以在 JRE-Runtimes 中自行修复此问题.

In JDK8 this is fixed and JavaFX is on the ExtensionClasspath but still you'll get warnings from Eclipse because stuff on the extension classpath is considered an implementation detail - you'll can fix this yourself in the JRE-Runtimes.

您对 e(fx)clipse 有什么问题?无论您是针对 JDK7 还是 JDK8 开发,它都能解决您的所有问题?

What's your problem with e(fx)clipse? It would fix all your problems no matter if you develop against JDK7 or JDK8?

这篇关于Eclipse 无法识别 JavaFX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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