Restriction: This applies to native code only.
To write a class in native OO COBOL which can be called from Java, you need to do the following:
- Set the following directive in your program:
Windows:
$set ooctrl(+p-f)
- Ensure that the native OO COBOL class inherits from javabase.
- Create a Java wrapper class for the native OO COBOL class. The wrapper class must have the same class name as the filename
of the native OO COBOL class.
- For each method that you create in your native OO COBOL class, create a corresponding method in the Java wrapper class.
- Package the class inside a .dll file when deploying it on Windows platforms.
You can also use classes compiled to
.int or
.gnt, but this does not allow you to package several classes inside one file.