Using Java SDKs for z/OS

The Java™ SDKs for z/OS® are based on the XPLINK linkage convention defined by Language Environment®.

If the application starts with a Java program or the main factory method of a COBOL class, the XPLINK environment is automatically started by the java command that starts the JVM and runs the application.

If an application starts with a COBOL program that invokes methods on COBOL or Java classes, you must specify the XPLINK(ON) runtime option so that the XPLINK environment is initialized. XPLINK(ON) is not recommended as a default setting, however; you should use XPLINK(ON) only for applications that specifically require it.

When you are running an application under z/OS UNIX, you can set the XPLINK(ON) option by using the _CEE_RUNOPTS environment variable as follows:


_CEE_RUNOPTS="XPLINK(ON)"

Exporting _CEE_RUNOPTS="XPLINK(ON)" so that it is in effect for the entire z/OS UNIX shell session is not recommended, however. Suppose for example that an OO COBOL application starts with a COBOL program called App1Driver. One way to limit the effect of the XPLINK option to the execution of the App1Driver application is to set the _CEE_RUNOPTS variable on the command-line invocation of App1Driver as follows:


_CEE_RUNOPTS="XPLINK(ON)" App1Driver

related references  
Object-oriented syntax, and Java 6, Java 7, or Java 8  
Runtime environment variables  
Language Environment Programming Reference (XPLINK)
XL C/C++ Programming Guide (_CEE_RUNOPTS)