如何将JavaFX嵌入到eclipse rcp视图中 [英] How to embed JavaFX into eclipse rcp view

查看:453
本文介绍了如何将JavaFX嵌入到eclipse rcp视图中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从一个简单的eclipse视图中使用JavaFX 2,但我得到了一个

I am trying to use JavaFX 2 from a simple eclipse view, but I am getting an


java.lang.UnsatisfiedLinkError:无效类的URL:
bundleresource://435.fwk1827795025/com/sun/glass/utils/NativeLibLoader.class

java.lang.UnsatisfiedLinkError: Invalid URL for class: bundleresource://435.fwk1827795025/com/sun/glass/utils/NativeLibLoader.class

在使用JAD进行一些调查后,我发现NativeLibLoader有非常有趣的检查:

After some investigation with JAD I have found out that NativeLibLoader has very interesting check:

if(!classUrlString.startsWith("jar:file:") || classUrlString.indexOf("!") == -1)
    throw new UnsatisfiedLinkError((new StringBuilder()).append("Invalid URL for class: ").append(classUrlString).toString());

这是否意味着不能从OSGi包中使用javafx?请证明我错了。

Does this mean that javafx can't be used from OSGi bundle? Please prove me wrong.

推荐答案

更新JavaFX加载程序更多与OSGI友好计划发布Lombard版本( JavaFX 3.0时间范围,即2013年)。在此之前,您可能会遇到从OSGI包中使用JavaFX的问题。通过在 JavaFX Jira 中搜索OSGI可以找到其他OSGI相关问题(任何人都可以注册查看错误和那里列出的问题)。 Tom Schindl e(fx)clipse 插件,是Eclipse中集成JavaFX经验的最佳接触点。

Updates to the JavaFX loader to be more friendly with OSGI are scheduled for the "Lombard" release (which is the JavaFX 3.0 timeframe, i.e. 2013). Until then, you may encounter issues working with JavaFX from an OSGI bundle. Other OSGI related issues can be found by searching for OSGI in the JavaFX Jira (anybody can signup to view the bugs and issues listed there). Tom Schindl, the creator of the e(fx)clipse plugin for JavaFX in Eclipse, would be the best contact point with experience in integrating JavaFX within Eclipse.

这篇关于如何将JavaFX嵌入到eclipse rcp视图中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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