在 Java 上嵌入 XULRunner 应用程序
我的目标是让 Limewire(JAVA) 和 Songbird(XULRunner) 一起运行。
我认为最好的方法是在 JAVA swing 面板中运行 XUL 应用程序(songbird)。 还有别的办法吗?
将 GUI 完全放在 XUL 中,然后以某种方式访问我的 JAVA 对象会更好吗?
我该怎么做呢?
谢谢
My goal is to get Limewire(JAVA) and Songbird(XULRunner) to run together.
I was thinking the best way is to run the XUL application(songbird) inside a JAVA swing panel. Is there another way?
Would it be better or possible to have the GUI entirely in XUL, and then access my JAVA objects somehow?
How would I go about doing this?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
看一下 JRex,因为它可能会让您了解一些想法。
除此之外,我还会研究 Rhinohide 。
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.
查看 DJ Native Swing,它是使用 SWT 的本机 Swing 实现和徐行者。
Take a look at DJ Native Swing, a native Swing implementation using SWT and Xulrunner.
我目前正在研究 XUL 的新产品,我遇到了 JavaXPCOM允许 Java 代码与 XPCOM 对象交互。 我仍然对 Mozilla 堆栈很感兴趣,但据我了解,所有 XULRunner 应用程序都使用 XPCOM。 因此,看起来您应该能够使用这种方法嵌入 Songbird。
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.
Mozilla 的官方 XUL 实现严重依赖于 Gecko。
Gecko 不是用 Java 编写的,也不是嵌入在 AWT/Swing/SWT 中(至少不使用 JNI)。
所以,简短的回答是:不。 您必须使用 JNI 或使用繁重、复杂且不完整的第三方库。
但是,JavaXPCOM 似乎允许嵌入 Gecko: https://developer.mozilla.org/en/JavaXPCOM
但在这种情况下,你将依赖 Gecko……我不知道这是否足以运行 Songbird。
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.
我会检查 Limewire 的源代码。 如果 UI 和应用程序的其余部分之间有明确的分离,我会尝试找到一个解决方案来实例化并从 Songbird 扩展中调用 Limewire 的非 UI 代码。
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.
我会看一下 eclipse swt 的嵌入
苏尔奔跑者:
http://www.eclipse.org/swt/faq.php#whatisbrowser
I would take a look at eclipse swt's embedding of
xulrunner:
http://www.eclipse.org/swt/faq.php#whatisbrowser