来自java应用程序的Activex? [英] Activex from java application?

查看:188
本文介绍了来自java应用程序的Activex?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在Java应用程序中轻松嵌入ActiveX控件?这值得么。在我的下一个项目中,我应该在Java应用程序中使用现有的activex,或者必须从头开始重新实现所有内容,所以我想知道什么会减少麻烦。

Is it possible to easily embed ActiveX controls in Java application? Is it worth it. In my next project I should either use existing activex in Java app or have to reimplement everything from scratch, so I'm wondering what will be less hassle.

推荐答案

我认为如果不诉诸第三方图书馆,就有办法做到这一点。 (或者滚动你自己,但你确实说容易。)

I don't think there's a way to do this without resorting to a third party library. (Or rolling your own, but you did say "easily".)

SWT (标准窗口小部件工具包)包含对嵌入ActiveX控件的支持。 SWT是Swing的替代品,尽管它们之间存在一定程度的互操作性。

这里是一个在SWT窗口中嵌入Windows Media Player的示例。

SWT (The "Standard Widget Toolkit") contains support for embedding ActiveX controls. SWT is an alternative to Swing, though there is a degree of interoperability between them.
Here's an example of embedding Windows Media Player in an SWT window.

另外还有雅各布项目,但我还没有我自己用过。

Alternatively there's the Jacob project, though I haven't used that myself.

至于它值得吗?好吧,我可以从经验中说SWT让它变得相对简单,但除非你的应用程序可以优雅地处理它们没有它们,依靠COM组件你将失去在多个平台上运行的能力,这使得Java首先具有吸引力。

As for "is it worth it?" Well, I can say from experience that SWT makes it relatively easy, but unless your application can gracefully deal with not having them available, by relying on COM components you are losing the ability to run on multiple platforms that makes Java attractive in the first place.

这篇关于来自java应用程序的Activex?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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