The Wrapper Class

Restriction: This applies to native code only.

The Java wrapper class must extend either microfocus.cobol.RuntimeObject or microfocus.cobol.RuntimeSystem. This affects the lifetime of the native OO COBOL instances represented by instances of the Java wrapper class:

The wrapper class needs to be initialized with the library and filename of the COBOL class it is wrapping. You do this by including the following code inside the Java wrapper class:



s the name of the .dll file which contains the native OO COBOL class. You can leave this parameter as null if the class is not packaged inside a .dll file - for example, if it is running as .int or .gnt code.
is the filename of the native OO COBOL class.
is the Java classname corresponding to the native OO COBOL class.

There are three cobloadclass() methods, which provide slightly different ways of identifying the library, COBOL file and the Java wrapper class.