Previous PageNext Page

12.1.3 Registering a Java Class as a COM Component on Linux

Note:

If you are using the UNIX version of Chili!Soft ASP, check the next section, Registering a Java Class as a COM Component

The chregclass command line tool is used to create a registry entry mapping a given ProgID to a Java class. This is similar to the javareg tool for the Microsoft JVM. For example, to register the Table.class in the package Database on the CLASSPATH, run cbreg as follows (this tool must be run from the installation directory):
 

chregclass Db.Table Database/Table.

After running chregclass, a Table object can be constructed in a client script by using:
 

set table = Server.CreateObject("Db.Table")

To overwrite a ProgId already in the registry you have to use the following command:
 

chregclass -f <ProgId> <java.Class>

Any class registered using chregclass must have a public default constructor that is used to instantiate the class. The ASP engine must be stopped to perform any changes to the registry; this applies to all cbregclass calls.
 

Copyright © 2000 Chili!Soft

Previous PageTop Of PageNext Page