問題描述
我必須創建一個自動執行 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 橋接器?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!