Step 4: Building Java programs
This topic briefly discusses the building of Java™ files that are part of a non-OO COBOL application that interoperates with Java.
About this task
The Java files in the application should be built as they
normally would be. However, if a Java class interacts with
COBOL using this framework by either calling COBOL native methods or accessing COBOL
WORKING-STORAGE directly, it is necessary to import the Java package that contains the COBOL classes generated by the
cjbuild utility. This is the package name specified via the -p
option of cjbuild and which defaults to enterprise.COBOL.
For example, this is the import statement for the default interoperability package name that will
be added to the top of a Java
file:
import enterprise.COBOL.*;Next step: Example: COBPROD application - building and running.