Search code examples
javacom

Using COM assemblies in Java


I want to be able to use a COM assembly in a Java program. From what I have read Java is capable of communicating with a COM assembly. However the ways of doing this involved the Visual J++ Type Library Wizard to convert the dll into a jar. Obviously J++ is no longer in existence and I doubt the Type Library Wizard is either.

Is there any way to perform the conversion from a COM assembly to a file usable by a Java IDE?

(I know you can talk to .NET languages using the JNI or commercial applications such as JNBridge. This seems like it would be simpler if possible though)


Solution

  • The very best open source free one J-interop. Sorry for sounding like a moving advertisement, but I used this one in couple of years and my experience was quite good. This is a complete implementation of the DCOM protocol. Which means that you can connect straight from a linux PC to your COM server on windows without any JNI.

    http://j-interop.dimentrix.com

    Of course the alternatives are JNI wrapper. J-Interga can be an option , but it is payed. Probably some other stuff.