The Java 11 support in Eclipse 4.16 allows modularization of a Java application. Projects with a Java compliance level of
9 or above benefit from the Java Platform Modules System (JPMS) enhancements; however, JVM COBOL projects have a compliance
level of 1.7, which makes them non-modular projects. JVM COBOL projects can be used in a modularized Java application as an
automatic module, with no option for customizing module exports and required modules.
On Linux, you need to use the Java/COBOL launcher, cobjrun, to call COBOL from Java. However, an attempt to call COBOL from
Java using the Eclipse IDE might fail with error "Specified executable /opt/microfocus/VisualCOBOL/bin/cobjrun does not exist for jdkversion". This is because Java searches for the cobjrun executable in the bin directory of the JDK installation. To work around this,
you need to add a symbolic link to cobjrun in the bin directory of the JDK installation and then specify this link as the
JAVA executable. Read
Java/COBOL Application Launcher for more.
When calling a COBOL method from Java, even if it is known that the COBOL method may throw exceptions, it is not possible
to use a
catch block in the Java to catch that particular exception. It is possible to catch
java.lang.Exceptions in the Java, and from there to determine the actual exception type.
If a Java exception is thrown in a mixed COBOL and Java application, and one of the methods on the exception call stack is
for a COBOL module built from a source file with more than 65535 lines of code, then the line number in the exception stack
may be incorrect if:
The program is written in Object-Oriented COBOL and the method name on the stack is overridden by other methods of the same
name in that class.
The exception is caught by a calling Java program. In this case, the line number can be corrected by rethrowing the exception
as follows: