If desired, you can invoke a Java program from COBOL by calling the JVM shared library or DLL and then invoking the routines in that library. In the case of JRE 1.4.2_04, these files are called "jvm.dll" and "libjvm.so". You can call these files in one of two ways:
CALL "libjvm.so" CALL "JVMfunction"
For more information on calling DLLs and shared libraries and their functions, see Working with Windows Technologies and Using ActiveX Controls and COM Objects.
In Windows, you can CALL the DLL to load it, as shown here:
CALL "JVM.dll"
Then you can call any of the routines contained in the DLL using the direct C interface. This is described in Working with C and C++ Programs.