Any method to access Windows COM methods using Java?

I have an application that uses JNA to call functions from a hardware abstraction library in C ++. One of the supported hardware devices requires initialization of the Windows COM subsystem (via CoInitialize or CoInitializeEx).

Does anyone know any java library that can do the trick? I know that I can wrap some Windows features, but if I had something ready and tested, it would be better. I found one of JACOB , but it says that the documentation is not very good, and that was a long time ago since they last updated it.

Thank!

+5
source share
2 answers

We use Com4J (for external processes such as Excel) and the SWT COM API (for embedded GUI components). Sometimes we use Jacob, it depends on what control you want to control. Sometimes they do not implement the IDispatch interface correctly, and then only one of the Java Com APIs works.

We also had COM components that needed a VB6 DLL, which in turn could be called with Com4J, so get ready for some headaches!

+3
source

Take a look @ JCom (Java-COM Bridge)

Another implementation exists, but I used it and worked for me.

+3
source

All Articles