Embedding XULRunner application on Java

和自甴很熟 提交于 2019-11-30 10:19:38

Take a look at JRex, as it might let you peek into a couple of ideas.

Other than that, I'd also research about Rhinohide as well.

Take a look at DJ Native Swing, a native Swing implementation using SWT and Xulrunner.

I am currently researching XUL for a new product and I came across JavaXPCOM which allows Java code to interact with XPCOM objects. I'm still wrapping my head around the Mozilla stack, but from what I understand all XULRunner applications use XPCOM. Therefore, it seems like you should be able to embed Songbird with this approach.

The official XUL implementation by Mozilla and is heavily dependent on Gecko. Gecko is not written in Java nor embedded in AWT/Swing/SWT (at least without using JNI).

So, the short answer is: no. You must either use JNI or use heavy, complex and incomplete third party libaries.

However, JavaXPCOM seems to allow embedding Gecko: https://developer.mozilla.org/en/JavaXPCOM But in that case you'll depend on Gecko... and I don't know if that's enough to run Songbird.

I would examine Limewire's source code. If there's a clean separation between UI and the rest of the application, I would try finding a solution to instantiate and invoke Limewire's non-UI code from within a Songbird extension.

I would take a look at eclipse swt's embedding of xulrunner: http://www.eclipse.org/swt/faq.php#whatisbrowser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!