Using adapter classes generated by the J adapter class generator enables the following types of operation for Java.
To COBOL programs, Java objects seem to be COBOL objects. Therefore, Java objects can be handled the same way as ordinary COBOL objects.
Access to a public class variable (static field) declared in a Java class is enabled. COBOL handles it as a factory property.
A public class method (static method) declared in a Java class can be invoked. COBOL handles it as a factory method.
Generating an instance object (invoking a constructor)
Invoking a constructor can create a Java instance object. COBOL handles it as a factory method that returns an object.
Accessing an instance variable
Access to a public instance variable (non-static field) of a Java instance object is enabled. COBOL handles it as an object property.
A public instance method (non-static method) of a Java instance object can be invoked. COBOL handles it as an object method.
An exception caused when a class method, constructor, or instance method is invoked can be trapped to perform error processing. COBOL uses the USE statement to receive an exception object.