简体   繁体   English

在OSGi环境中使用第三方JavaFX库

[英]Using third party JavaFX libraries in OSGi enviroment

I have problems with using third party javafx components with my efxclipse rcp application. 我在efxclipse rcp应用程序中使用第三方javafx组件时遇到问题。

For example ControlsFX. 例如ControlsFX。 First I used p2-maven-plugin from reficio . 首先,我使用了来自reficio的p2-maven-plugin Application fails because ControlsFx imports com.sun.* packages not published by EFX. 应用程序失败,因为ControlsFx导入了EFX未发布的com.sun。*程序包。 I have tried to add these internal packages to my setup through sistem bundle fragment . 我试图通过sistem捆绑包片段将这些内部软件包添加到我的设置中。 Failed again. 再次失败。 Then I have tried to bundle all dependencies of component (all jars) to one bundle (with extracted classes and without them / just jars). 然后,我尝试将组件(所有jar)的所有依赖项捆绑到一个捆绑包中(具有提取的类,而没有它们/只是jar)。 This method works but breaks css skins of components. 此方法有效,但会破坏组件的CSS外观。 So any css and skin operation like caret or icons missed. 因此,错过了诸如插入符号或图标之类的任何CSS和皮肤操作。

I have tried libraries like RichTextFX, ControlsFX, JideFX, JFXtras ... Every time same result. 我尝试过像RichTextFX,ControlsFX,JideFX,JFXtras之类的库...每次都得到相同的结果。 All these libraries work under normal Maven JavaFX application setup. 所有这些库均在正常的Maven JavaFX应用程序设置下运行。 Obviously I am doing it wrong way. 显然我做错了。 What is the right way??!! 什么是正确的方法?

I recommend you to transform the library to an OSGI ready bundle. 我建议您将库转换为OSGI就绪包。 This is simple just follow this: http://cq-ops.tumblr.com/post/21893960212/how-to-turn-a-jdbc-driver-jar-into-an-osgi-bundle good luck :) 这很简单,只需遵循以下步骤: http : //cq-ops.tumblr.com/post/21893960212/how-to-turn-a-jdbc-driver-jar-into-an-osgi-bundle祝您好运:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM