Clear API & Docs

Extensive documentation and dozens of  examples.

Prompt support

Get reply from ComfyJ engineers within one business day on the support site or premium support service.

Proven expertise

Created by engineers who have been integrating Java with MS IE, Firefox, WebKit, Safari, and Chromium for 20 years.

Simple integration

IE automation sample

  • /.../
    • /*
    •  * Copyright (c) 2000-2024 TeamDev Ltd. All rights reserved.
    •  * TeamDev PROPRIETARY and CONFIDENTIAL.
    •  * Use is subject to licence terms.
    •  */
  •  
  • import ...
    • 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());
      • contentPane.add(container);
      •  
      • 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 window is shown
          • container.doVerb(OleVerbs.SHOW);
        • }
        •  
        • public void windowClosing(WindowEvent e) {
          • // Destroy the object when window is closed
          • container.destroyObject();
        • }
      • });
      }
    •  
    • public static void main(String[] args) throws Exception {...
      • final IEAutomationSample sample = new IEAutomationSample();
      • sample.setSize(800, 600);
      • sample.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      • sample.setLocationRelativeTo(null);
      • sample.setVisible(true);
      }
    }
  •  

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.

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.

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.

Handling of COM Events

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

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.

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.

CodeGenerator utility

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.

Examples of apps our customers build

Java applications which integrate with MS Office components

and provide ability to create, edit and display various Office documents such Word, Excel, PowerPoint documents. ComfyJ provides OfficeContainer component for embedding Office documents.

Java applications which embed various system (such as MediaPlayer, InternetExplorer, etc.) and third-party (such as PDF Viewer, Shockwave Flash Player, etc.) ActiveX components directly to Swing UI.

ComfyJ provides OleContainer component that allows to embed any ActiveX component into Java Swing UI.

Java libraries which integrate with various COM Type Libraries.

ComfyJ gives Java applications great flexibility to integrate with any COM Type Library. ComfyJ Code Generator provides the ability to create the Java wrappers for COM types from a COM Type Library.

Java applications which expose Java classes to COM.

ComfyJ provides ability to create COM classes directly in Java and expose them as Java COM servers so that another COM applications can access them via COM.

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 license purchase.

Evaluation Support

Provided for 30 days

Standard Support

Provided for one year with 25% discount for renewal

Premium Support

Contract-based time and materials service
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
Provided by email
Product updates
Product updates
Phone, chat and remote desktop
Feature development
Priority issue resolution
Licensing and pricing

Pay once, use forever

License use is governed by the product license agreement

Per developer

$1,149
  • 1 developer

  • Perpetual license Perpetual license means you can always use the product version that you purchased, or the one you updated to during your valid support subscription.

  • Free distribution within your application

  • Unlimited projects

  • Updates & Support

  • 1 year of product updates

  • 1 year of technical support

  • 55 hours of support for 1 year

Project

$3,399
  • Unlimited developers

  • Perpetual license Perpetual license means you can always use the product version that you purchased, or the one you updated to during your valid support subscription.

  • Free distribution within your application

  • 1 project Bundled to a Java package of the project.

  • Updates & Support

  • 1 year of product updates

  • 1 year of technical support

  • 75 hours of support for 1 year

Company-wide

$10,699
  • Unlimited developers

  • Perpetual license Perpetual license means you can always use the product version that you purchased, or the one you updated to during your valid support subscription.

  • Free distribution within your application

  • Unlimited projects

  • Updates & Support

  • 1 year of product updates

  • 1 year of technical support

  • 300 hours of support for 1 year

Updates & Support subscription renewal for 1 year

with 25% discount on the license price

The prices on this page are exclusive of any taxes.

Get licenses via resellers

Frequently asked questions

Technical questions

Is it possible to integrate with a .NET component using ComfyJ?

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

What does the AutoDelete property of the IUknown interface mean?

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.

How to query a required COM interface from a COM object in ComfyJ?

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

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

Or

IOleObjectImpl oleObject = new IOleObjectImpl(comObject);

Can I use ComfyJ in Java applet?

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.

Can I release a COM object?

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.

Does ComfyJ provide the ability to embed an ActiveX component to a Java window?

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

Where should I put my ComfyJ license files (jniwrap.lic, comfyj.lic)?

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

How I can redistribute native JNIWrapper library (jniwrap.dll, jniwrap64.dll, etc.) with my application?

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

When I invoke method of a COM object, it throws COM exception: COM object method returns error code: 0x800401F0; CO_E_NOTINITIALIZED

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

Is it possible to expose Java object to COM using ComfyJ?

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

How do I configure the license?

Licensing questions

What is your licensing based on?

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

Can I receive a free upgrade?

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 license price.

What are the terms for using ComfyJ?

Please take a look at the Product License Agreement.

There are 6 people on our team, and 2 of them need to use ComfyJ. How many licenses do we need to purchase?

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

If we take a developer, working with ComfyJ, off the project, can we reassign the license to another developer?

This is possible with the Per Developer License.

How many copies of my product can I distribute with ComfyJ included?

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

We have 5 people, who work with ComfyJ on one product.

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

How is a Project License bound to my project?

Project License 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

Which class can be used for binding the license?

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

What’s the definition of “project” in terms of the Project License?

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.

Will we be able to use the Project License in another project we do?

The Project License is tied to one project only.

We’d like a license for multiple projects for a team of developers, what would you offer?

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

How do I find the license file?

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

Free 30‑day trial

We will email you your trial key and a quick start guide.

Please do not use special characters or spaces

Please enter a valid email address

Read and agree to the terms to continue.
Spinner

Sending…

Sorry, the sending was interrupted

Please try again. If the issue persists, contact us at info@teamdev.com.

Thank you!

Start your free trial in few simple steps

1

Check your email

Links to download your evaluation license 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.

2

Install the license

To start using ComfyJ

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

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.