Another way to invoke a Java program from COBOL is to send a Java command line to the host operating system. You can do this using ACUCOBOL-GT's C$SYSTEM library routine. This routine combines the functionality of the "SYSTEM" and "C$RUN" routines.
To call a Java program from COBOL via C$SYSTEM, you:
move "javaw -classpath cvm.jar;./ acuprod.AcuOrder" to the-run-command. call "C$SYSTEM" using the-run-command.
The C$SYSTEM routine submits the command line to the host operating system as if it were a command keyed in from the terminal.
Note that you can call C$RUN instead of C$SYSTEM to run the Java program asynchronously, as in: call "C$RUN" using the-run-command.