The Wrapper Class

The Java wrapper class must extend either microfocus.cobol.RuntimeObject or microfocus.cobol.RuntimeSystem. This affects the lifetime of the 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:



libname is the name of the .dll file which contains the 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.
filename is the filename of the OO COBOL class.
FullJavaClassName is the Java classname corresponding to the OO COBOL class.

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