Previous Topic Next topic Print topic


JVM COBOL Calling Java

In order to call Java from JVM COBOL you need to add the Java project to the build path of the JVM COBOL project. There is no special syntax for calling the Java types from your JVM COBOL code. The Java types appear in the Content Assist for the JVM COBOL project alongside the other available types.

The following outlines the steps to enable calling Java from JVM COBOL:

  1. In your Eclipse workspace, create a Java project that contains the Java program which you wish to call from JVM COBOL.
  2. In your Eclipse workspace, create a JVM COBOL project for the calling JVM COBOL program.
  3. Add the Java project to the JVM build path of the JVM COBOL project (Project > Properties > Micro Focus > JVM Build Path > Projects).
  4. In the JVM COBOL code, declare variables of the types defined in your Java project.
Previous Topic Next topic Print topic