Registering a Java COM Component

This article has two sections:
See the readme.

Why register COM components?

The registry is a system database that holds configuration information. The registry provides necessary bindings between identifiers for COM components and the implementation for that component. COM components need to be in the registry to be created.

Typically, a vendor registers COM components as part of the installation process. For this sample, you are the vendor, therefore, you must register the COM component yourself.

Return to the top of this article.


Using JavaReg

JAVAREG.EXE is a tool that registers Java class files as COM components. This tool has a number of options. One of the key options is /clsid. The CLSID must match the one in the type library for this COM component. See the online documentation for more information on JavaReg.

To facilitate calling JavaReg, the sample includes the batch file REGISTEREUCLID.BAT.

To run JavaReg using the batch file:

  1. Create a command window.
    From the Start menu, select Programs.
    Select MS-DOS Prompt or Command Prompt, depending on the version of the operating system.
  2. In the command window, include the Developer Studio BIN directory in the path.
    This directory is c:\msdev\BIN, where c:\msdev is the directory where you installed Visual J++.
       set path=%path%;c:\msdev\bin
  3. In the command window, navigate to the sample directory.
  4. In the command window, run RegisterEuclid.
       registereuclid

Return to the top of this article.