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

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

问题描述

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

  import javafx.fxml.Initializable; 

无法识别。我不想手动链接到jar。



我以前听说过这是一个bug,但是它应该已经被修复了。 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7166330



有没有人有关于如何识别javafx的答案。我不想让e(fx)clipe为我做,我不想要链接jar。据我所知,它现在包含在jdk的最新版本中,因此我应该能够像上面那样做一个导入?

解决方案

JavaFX不在JDK7中的任何默认类路径中 - 请参阅哪个版本的错误已修复!



在JDK8中,固定和JavaFX是在ExtensionClasspath,但仍然会收到来自Eclipse的警告,因为扩展类路径上的东西被认为是一个实现细节 - 你可以自己修复这个JRE-Runtimes。



e(fx)剪辑有什么问题?无论您是针对JDK7还是JDK8开发,都会解决所有问题?


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;

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

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

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 isn't on any of the default classpaths in JDK7 - please see in which version the bug has been fixed!

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.

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

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

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