Configuration and Deployment

To call Java from COBOL using the C$JAVA routine, perform the following steps:

  1. Install and correctly configure an ACUCOBOL-GT runtime. Optionally, install AcuBench if the system will also be used for COBOL development.
  2. Install and correctly configure a JRE version 1.4.2 or later. Optionally, install a J2SE SDK if the same system will also be used for Java development.
  3. Configure the ACUCOBOL-GT runtime as appropriate by creating a runtime configuration file.

    By default, the JVM is loaded by the runtime the first time it executes a CALL "C$JAVA" statement. If you want to preload the JVM, use the PRELOAD_JAVA_LIBRARY variable. Use the JAVA_LIBRARY_NAME variable if you want to specify the DLL that exports the JNI API for loading the JVM. If desired, specify Java command-line options using the JAVA_OPTIONS variable. You can specify additional libraries and classpaths here as well.

  4. Issue a CALL "C$JAVA" statement to call the C$JAVA library routine.