tags:

views:

62

answers:

2

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...)

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

  • J-Interop
  • SWT
  • JACOB
  • COM4J
  • jacoZoom
  • ...

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?

+1  A: 

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

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 seems to be outdated, you're right.

Christopher
A: 

A question for your question. Why is VB6 the only other language suitable for your task?

A language running on .NET (which includes VB.NET) would be vastly more suitable for COM automation than Java because it has built in COM interop just for the purpose. While it is possible to do the same in Java, it is a lot more painful to do.

locka
My boss doesn't allow any other than Java or VB6 (at least not for this task)
DR
locka