Taking advantage of the object-oriented function, NetCOBOL enables programming using class libraries. The NetCOBOL also provides many useful foundation classes. Meantime, as Java becomes popular, many Java class libraries are also provided. However, the class structure varies from language to language and therefore Java class libraries cannot normally be used from COBOL.
The J adapter class generator provides a framework that enables COBOL to use Java classes.
The J adapter class generator enables a COBOL program to:
Use a Java class library.
Call a Java application.
Use an application program interface (API) provided for Java.
The J adapter class generator enables COBOL to be used for systems that previously could only have been implemented in Java.
Use of the J adapter class generator is recommended in the following situations:
Constructing a COBOL system using Java common parts such as EJB components.
Constructing a COBOL system using whole Java applications.
An outline of the J adapter class generator is given below:
The Java class interface must be converted into the COBOL interface for a COBOL program to use Java classes. The J adapter class generator generates an adapter class that converts the Java interface into the COBOL interface.