Previous Topic Next topic Print topic


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 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:

static 
{
  cobloadclass("libname","filename","fullJavaClassName");  
}

where:

libname
s 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 .
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.

Previous Topic Next topic Print topic