Java2COM is a bi-directional Java-COM bridging tool that enables Java applications to use COM objects and makes possible to expose Java objects as if they were COM objects.

Java2COM, which was designed to provide lightweight wrappers for COM protocols, attempts to preserve various semantics of COM. The main benefit of such an approach is two-folded: on one hand, it simplifies porting of existing Visual Basic or C++ code to Java and gives COM-savvy developers a head-start. On the other hand, it makes it easier to keep up with changes in COM technology while COM evolves. 

Another design goal was to minimize the use of the so-called "native" code. While the native code is necessary to bridge Java and COM, it is almost always desirable to limit the exposure to native code to a relatively small subset of classes/methods that the rest of the system can be built upon. 

To communicate with COM/Windows world, Java2COM uses Java-To-Native-To-Java interface called Coroutine that offers the following basic facilities: 

The rest is 100% Java. 

Java2COM class hierarchy is modeled after COM interface hierarchy. Like in COM, where the IUnknown interface is the root for all COM interfaces, COMIUnknown Java class is the super class for most of Java classes that make Java2COM. As a result, a developer with the knowledge of COM principles can easily extend COMIUnknown adding support for COM interfaces currently not included in Java2COM offerings. 

We will start with a brief introduction to COM. In the next section, we will define basic COM elements and outline relationship between various COM entities. Since Java2COM was designed after COM the main goal of this introduction is to shed some light on why things are done in Java2COM the way they are.

We expects you to be comfortable with key COM concepts and techniques. If you want to brush up on those, you may want to consider check articles available on MSDN Web site.  The mother of all COM books – "Inside OLE", by Kraig Brockschmidt, Microsoft Press - is an excellent source for learning COM. Also "Professional DCOM Programming" by Richard Grimes, Wrox Press and "Essential COM" by Don Box, Addison Wesly Press could bring you up-to-date on all the recent developments in COM