Why ComfyJ

Simple Integration

IE Automation Sample

import com.jniwrapper.win32.automation.Automation;
import com.jniwrapper.win32.automation.OleContainer;
import com.jniwrapper.win32.automation.IDispatch;
import com.jniwrapper.win32.automation.types.Variant;
import com.jniwrapper.win32.ole.types.OleVerbs;

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
 * This example demonstrates the embedding of Browser component into Java.

public class IEAutomationSample extends JFrame {
    private OleContainer container = new OleContainer();

    public IEAutomationSample() throws HeadlessException {
        super("Internet Explorer ");

        Container contentPane = getContentPane();
        contentPane.setLayout(new BorderLayout());

        container.createObject("Shell.Explorer"); // Create Browser component by its ProgID   

        final Automation webBrowserAutomation = new Automation(container.getOleObject());  
        webBrowserAutomation.invoke("Navigate2", new Object[]{"www.teamdev.com"});   

        Variant documentVariant = webBrowserAutomation.getProperty("Document");
        IDispatch document = documentVariant.getPdispVal();
        System.out.println("document = " + document.isNull());

        this.addWindowListener(new WindowAdapter() {
            public void windowOpened(WindowEvent e) {
                // Show browser component, when parent widnow is shown

            public void windowClosing(WindowEvent e) {
                // Destroy the object when window is closed

    public static void main(String[] args) throws Exception {
        final IEAutomationSample sample = new IEAutomationSample();
        sample.setSize(800, 600);

COM-to-Java Integration

COM Interfaces & Data Types Wrappers

COM interfaces & data types wrappers allow working with COM types and interfaces like ordinary Java objects. For example, you can use IUnknown, IClassFactory, and IDispatch as typical Java interfaces, and Variant(VARIANT), BStr(BSTR), SafeArray etc. as regular Java types.

VTBL & COM Automation

ComfyJ allows invoking methods of a COM object via its function indexes in VTBL (Virtual Method Table), or by its names using the Automation approach. Also, Automation allows for obtaining and setting properties of a COM object, including indexed and named ones.

Support for Multiple Threading Models

ComfyJ provides a set of different concurrency models which you can use for initializing COM integration in your Java application.

DCOM Support

ComfyJ allows you to create a COM object on a remote server.

COM Memory Management

All COM and other native resources will be garbage-collected automatically, or you can release them if required by the application logic.

Embedding of OLE/OCX/ActiveX Components to Swing

ComfyJ includes the OleContainer Swing component, which allows you to:

  • Use any visual COM component (OCX/ActiveX) in Java Swing UI. Using this functionality, you can embed various ActiveX applications, such as Internet Explorer, Acrobat Reader and Microsoft Office, as well as various media components such as Windows MediaPlayer, DVD Player, QuickTime, ShockwaveFlash, etc.
  • Create an embedded object using ProgID, CLSID, or from a document file. Also, you can insert a COM object (which implements IOleObject COM interface) into container.
  • Save and load an embedded OleObject to or from a file in a special binary format.

Handling of COM Events

ComfyJ provides a standard COM technique for creating and advising COM event handlers to a COM object.

CodeGenerator Utility

With this bundled application, you can generate Java COM wrappers for COM components or COM Type Libraries. These generated classes allow you to work with COM objects just like regular Java objects. Moreover, this application can compile the generated classes and pack them into a JAR file, if needed.

Java-to-COM Integration

This aspect of ComfyJ allows you to create Java COM servers purely in Java. In other words, a designed Java COM server can be exposed as COM objects to other COM applications without writing a line of a native code.

Development of Java COM Servers

To simplify creation of custom Java COM servers, ComfyJ provides the base classes such as IUnknownServer and IDispatchServer so any custom Java COM objects can inherit these classes, depending on application requirements. Such Java COM servers can implement as many COM interfaces as required—from standard COM interfaces and COM interfaces generated by ComfyJ's Code Generator application, to custom ones.

Registration of Java COM Servers

ComfyJ also provides convenient ways for registering created Java COM servers. Such registration can be performed at runtime, i.e., for COM event handlers, or in COM Registry using a bundled ServerManager application. Also, you have the ability to register Java COM servers at runtime without using the ServerManager application. Such registered Java COM servers can be used by other COM applications.

Try the Demo

Run the demo comfyjdemo.jnlp

Runs on Microsoft Windows XP or later with:

  • JDK (JRE): 1.4.0 or later. Version 1.5 recommended;
  • Java™ WebStart. Version 1.5 recommended;
  • To see COM/OLE integration features, Adobe Acrobat Reader version 5.0 or higher is required.

Examples of Apps Our Customers Build

Getting Help

Contact Support

During evaluation period please use the email address, provided to you in the evaluation email.

If you have an active support subscription, please use the email address, provided to you in the email confirming the licence purchase.

Ask a Question

You can ask a question on our product forum. In order to do it, you will need a Google ID.


Send email: comfyj-forum@teamdev.com
Your message will be automatically posted on the web.

Evaluation SupportProvided for 30 days

Support Evaluation

Standard SupportProvided for one year with 25% discount for renewal

Support Standard

Premium SupportContract-based time and materials service

Support Premium
Help with the product use Help with the product use Help with the product use
Response within one business day Response within one business day Response within one business day
Provided by email Provided by email Phone, chat and remote desktop
Product updates Product updates
Feature development
Priority issue resolution
Evaluate for Free Request Renewal Contact Us
Keep up the great work, we are existing customers of TeamDev and are very happy with the products supplied! Jeremy Dixon, Thales Australia
We are very happy with ComfyJ, and we are also very happy with the quick responses on the technical forums when we have questions. Jeremy Dixon, Thales Australia

Licensing and Pricing

Licence use is governed by the Product Licence Agreement

  • Perpetual Licence Perpetual licence
  • Free Distribution Free distribution within your application
  • Support Updates 1 year Support and updates
  • 25% Discount Support renewal with 25% discount
  • 15% Discount 15% discount on TeamDev products

Per Developer $1,149

  • Developer 1 developer
  • Unlimited Projects Unlimited projects
  • Support 55 hours of support for 1 year
Buy Now

Project $3,399

  • Developers Unlimited developers
  • Project 1 project
  • Support 75 hours of support for 1 year
Contact Us

Company-wide $10,699

  • Developers Unlimited developers
  • Unlimited Projects Unlimited projects
  • Support 300 hours of support for 1 year
Contact Us

Source Code For 1 Developer

$5,999 1 Per Developer licence included
Developers Licence for more developers
is also available for purchase

Java Integration
Pack For 1 Developer

$1,999 ComfyJ, JExplorer and JNIWrapper for Windows
Developers Contact us for Project and Company–wide licence options

Get Licences via Resellers

Become a Reseller

Frequently Asked Questions

Technical Questions

It is possible only if that .NET component is built with enabled COM interop.

This property instructs ComfyJ's NativeResourceCollector (NRC) whether to release the COM object automatically or not. By default, this property is set to true for all resources that implement AutoDeleteParameter interface. When this property is set to false, the .release() method should not be called.

A required COM interface can be queried using the IUnknown.queryInterface() method, for example:

                            IOleObjectImpl oleObject = new IOleObjectImpl();
                            comObject.queryInterface(oleObject.getIID(), oleObject);

                            IOleObjectImpl oleObject = new IOleObjectImpl(comObject);

Yes, ComfyJ can be used in Java applets. There are several examples in ComfyJ distribution archive, in its samples\Applets\src\ subfolder, which demonstrate using of ComfyJ in Java applets.

Yes, every COM object can be released using its IUnknown#release() method. Make sure to set its AutoDelete property to false before releasing the object.

Yes, ComfyJ provides OleContainer Java component that allows embedding of any ActiveX component.

The simplest way is to package these files to the \META-INF\ subdirectory of an application JAR file.

The simplest way is to package all required JNIWrapper library files to root folder of an application JAR file.

COM should be initialized using ComFunctions.coInitialize() method in each Java thread (except OleMessageLoop) before working with COM objects.

Yes, ComfyJ provides the ability to create Java COM servers and register them in COM.

Licensing Questions

Our licensing is based on versions of ComfyJ. Having purchased the licence for our product you get the right to use the current major version of the product.

Major and minor version upgrades issued during your active Standard Support subscription period are free of charge. Upon expiration of the Standard Support subscription you can renew it with a 25% discount from the actual licence price.

You only need to purchase 2 licences. We licence our library by the number of people who write code using our library.

You can distribute unlimited number of copies of your product with our library enclosed.

You may want to purchase a Project licence, which is cost-effective in case there are 3 and more developers on the team. The Project licence is bound to a single project you do, but it allows any number of developers in your company to work with our library.

Project Licence is bound to your project via a fully-qualified class name. A fully-qualified name for a class is the package name followed by the class name, separated by a period (.). For example: com.mycompany.myproduct.MyClass

This can be any class of your application. The only requirement is that it should be included into your Java application class path.

When we say “project” we have in mind one product of your company including your future product versions or potential derivative works based on your product.

The Project licence is tied to one project only.

The best solution would be to purchase the Company–wide licence, which covers any number developers and projects in one company.

Upon the licence purchase you will receive an archive with two types of licence files: development and runtime. Development licenses are intended to be used in the development process. Runtime licences are to be used for distribution of your software with ComfyJ enclosed.

Yes, you can purchase ComfyJ Source Code Licence; it is provided on a per developer basis. Please contact our sales team if you are interested in this option.

If you are doing an open source or academic project, you can apply to get a free licence. Please submit a request via Open Source or Academic tab on the evaluation form.

Thank you!

Start your free trial in few simple steps


Check Your Email

Links to download your evaluation licence and distribution archive will arrive at your inbox in a few minutes.

If the message gets lost in your mailbox, try searching for an email from ComfyJ Evaluation Support with “Your Free 30 Days Trial” subject.


Install the Licence

To start using ComfyJ

  • download your evaluation licence,
  • download and extract the distribution archive,
  • include all the JAR files from the lib directory and evaluation licence licence.jar in your application class path.

Get Started

Take a look at the tutorial to get ComfyJ up and running in no time.

See Support Documentation for more information on using ComfyJ.


Check out the ready-made examples for instructions and ideas on what you can do with your newly gotten ComfyJ.


Commercial Open Source Academic

With this licence you will be able to evaluate our product for 30 days.
The evaluation licence will not work after this time, so you will need to purchase the licence.

With this licence you will be able to evaluate our product for 30 days.
The evaluation licence will not work after this time. If you are doing an open source project, you can request a permanent licence via the link provided in the email you will receive.

With this licence you will be able to evaluate our product for 30 days.
The evaluation licence will not work after this time. You can request a licence for duration of your academic project via the link provided in the email you will receive.

You should have an existing open source project which has commits and some life period of the project.

We can provide licences only for projects distributed under non-viral licence (LGPL, Apache, etc.). Our library is proprietary and we will not be able to disclose its code.