如何选择 Java-COM 桥接器?

How to choose a Java-COM bridge?(如何选择 Java-COM 桥接器?)
本文介绍了如何选择 Java-COM 桥接器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我必须创建一个自动执行 Outlook 和 Word 的应用程序,并且我想使用 Java 来完成该任务.(唯一允许的替代方案是 VB6,所以...)

I have to create an application which automates Outlook and Word and I want to use Java for that task. (The only allowed alternative would be VB6, so...)

通过 Google 快速调查后,我发现了几个库,但我不确定要使用哪一个:

After a quick Google survey I found several libraries, but I'm not sure which one to use:

  • J-Interop
  • SWT
  • 雅各布
  • COM4J
  • jacoZoom
  • ...

我不知道如何比较这些库并做出明智的决定.似乎 COM4J 有点过时,JACOB 泄漏内存(据称)并且 jacoZoom 是商业的.每一个似乎都需要大量样板代码来执行简单的方法调用.(考虑到 COM 的设计,这可能是不可避免的)

I have no idea how to compare these libraries and make an informed decision. It seems that COM4J is a little bit outdated, JACOB leaks memory (allegedly) and jacoZoom is commercial. Each and every one seems to require a lot of boilerplate code to perform a simple method call. (Which might be unavoidable given the design of COM)

除此之外,我不知道如何在其中之一之间进行选择.哪一个是最好的?

Besides that I have no idea how to choose between one of them. Which one is the best?

推荐答案

我们在生产环境中使用 Jacob,效果很好.然而,这些项目似乎不是很活跃.

We use Jacob in production environment and it works out pretty well. Nevertheless the projects seems to be not very active.

说到这一点:Activity 似乎是 J-Interop 的一个优势.我们也尝试了这个项目,它似乎工作得非常好,甚至有更好的日志消息.我想我们可能会为新项目选择 J-Interop.

Speaking of which: Activity seems to be an advantage for J-Interop. We tried the project as well and it seems to work out pretty good with even better logging messages. I think we might choose J-Interop for new projects.

COM4J 似乎已经过时了,你是对的.

COM4J seems to be outdated, you're right.

这篇关于如何选择 Java-COM 桥接器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

Sending a keyboard event from java to any application (on-screen-keyboard)(将键盘事件从 java 发送到任何应用程序(屏幕键盘))
How to make JComboBox selected item not changed when scrolling through its popuplist using keyboard(使用键盘滚动其弹出列表时如何使 JComboBox 所选项目不更改)
Capturing keystrokes without focus(在没有焦点的情况下捕获击键)
How can I position a layout right above the android on-screen keyboard?(如何将布局放置在 android 屏幕键盘的正上方?)
How to check for key being held down on startup in Java(如何检查在Java中启动时按住的键)
Android - Get keyboard key press(Android - 获取键盘按键)