Running Java applications

You can start JavaJava™ applications by using the java launcher, through JNI, or by using the JZOS Batch Launcher. You can customize your runtime environment by passing options to the Java virtual machine (VM); most of these options are provided by the OpenJ9 VM but a few are specific to the SDK.

For information about how to pass options to the Eclipse OpenJ9 VM, for example by command-line options or options files, see OpenJ9 command-line options.

Prerequisites

To run java commands on z/OS UNIX System Services, the z/OS Unicode Services must be installed and accessible to the user. It is a prerequisite that the system data sets SYS1.SCUNTBL and SYS1.SCUNLOCL must be present and accessible. For more information, see z/OS Unicode Services prerequisites. If the z/OS Unicode Services are not available or not accessible, the Java SDK commands such as java, javac, and jar fail to start, return an exit code 2. No console output or diagnostic information is generated.

java launcher

The java tool starts a Java application by starting a Java virtual machine and loading a specified class.

System properties

The system properties that are recognized by the OpenJ9 VM are described in Using system property command-line options in the OpenJ9 documentation.

The following additional system properties are recognized when using the SDK:

ibm.swapLF=true
By default, the \u000A Unicode new line character is mapped to the 0x15 EBCDIC character. Set this property to true to map the \u000A character to the 0x25 EBCDIC character instead. This behavior might be useful if you have a z/OS® system that interacts with a system that uses a different operating system. For more information about the historical background to new line characters in EBCDIC format, see Unicode Newline Guidelines.
Note: If you use this option, also convert all configuration files to ASCII format because the new line character (\n) is not recognized if the files are in EBCDIC format.
jdk.net.hosts.file
The jdk.net.hosts.file system property, from OpenJDK, specifies a file for mapping hostnames to IP addresses. This file must be in UTF-8 encoding, even on z/OS. For more information about the property, see Specify Mappings from Host Names to IP Addresses in the Oracle documentation.

Environment variables

The environment variables that are recognized by the OpenJ9 VM are described in Environment variables in the OpenJ9 documentation.

Command-line options

The command-line options that are recognized by the OpenJ9 VM are described in OpenJ9 command-line options in the OpenJ9 documentation. The following additional command-line options are recognized when using the SDK:

-Xifa:<on | off | force> (z/OS only)

z/OS can run Java applications on a type of special-purpose assist processor that is called the System z® Integrated Information Processor (zIIP). The zIIP supersedes the System z Application Assist Processor (zAAP), which was previously known as an IFA (Integrated Facility for Applications).

The -Xifa option enables Java applications to run on zIIPs if they are available. The default value for the -Xifa option is on.

Note: The force option is obsolete and must not be used. This option is superseded by the SYS1.PARMLIB(IEAOPTxx) PROJECTCPU=YES parameter, which is available on all supported levels of z/OS. Xifa:force can be used for testing purposes when a zIIP is not available, but can have a negative performance impact.