CICS and Java

CICS® provides the tools and runtime environment to develop and run Java™ applications in a Java Virtual Machine (JVM) that is under the control of a CICS region.

To help increase general-purpose processor productivity and contribute to lowering the overall cost of computing for z/OS® Java technology-based applications, special processors are available in certain IBM Z® hardware. The IBM® z Systems® Application Assist Processor (zAAP) can provide additional processor capacity to run eligible Java workloads, including Java workloads in CICS.

Java on z/OS provides comprehensive support for running Java applications. Further information about Java on the IBM Z platform can be found at Java SDK Products on z/OS, including links to download each of the SDKs.

You can build and deploy applications by using the IBM CICS SDK for Java, Maven, or Gradle. If you are a Java developer, check out Get started with Java in CICS.

Java runtime environments

CICS supports a choice of IBM Semeru Runtime Certified Edition for z/OS (Version 11.0 & 17.0) and IBM 64-bit SDK for z/OS, Java Technology Edition (Version 8.0) Java runtime environments.

Java 11Java 17IBM Semeru Runtime Certified Edition for z/OS

The IBM Semeru Runtime Certified Edition for z/OS is an implementation of the Java SDK. The Certified Edition contains a Java Runtime Environment that supports the full set of Java APIs and a set of development tools.

CICS uses either the IBM Semeru Runtime Certified Edition for z/OS Version 11.0.15.0 or Version 17.0.7.0 as the minimum release level.

The following restrictions apply:

  • The CICS TS build toolkit (CICS build toolkit) is not supported on Java 11 or Java 17
  • The SAML JVM server is not supported on Java 11 or Java 17
Java 8 IBM 64-bit SDK for z/OS, Java Technology Edition

CICS uses the IBM 64-bit SDK for z/OS, Java Technology Edition, Version 8.

Some Liberty features require specific Java versions, and these are called out in Liberty features. In addition, if any of your applications make Java RMI calls, you must ensure that you have the same Java level in both the client and sever run times.

In Java 11 and Java 17, the base JRE is different from the Java 8 JRE. While your Java 8 bytecode might run in later Java versions, it is worth reviewing your applications. For more information, see Migrating applications to new Java versions.

JVM server

The JVM server is the runtime environment for Java applications in CICS. A JVM server can handle many concurrent requests from different Java applications in a single JVM. Use of a JVM server reduces the number of JVMs that are required to run Java applications in a CICS region. As a guide to use a JVM server, Java applications must be threadsafe and must comply with the OSGi or Enterprise Java specifications, though different configurations can change that guidance. JVM server provides the following benefits:
  • Eligible Java workloads can run on specialty engine processors, reducing the cost of transactions.
  • Different types of work such as threadsafe Java programs and web services, can run in a JVM server.
  • Application life cycle can be managed in the OSGi framework, without restarting the JVM server.
  • Java applications that are packaged with OSGi can be ported between CICS and other platforms.
  • Enterprise Java applications can be deployed into the Liberty JVM server.
    Note: OSGi bundles in CICS can be installed in a Liberty JVM server but cannot use any of the Liberty services or features as they are not supported.

IBM CICS SDK for Java

CICS Explorer® is a freely available download for Eclipse-based Integrated Development Environments (IDEs). The IBM CICS SDK for Java that is included with CICS Explorer supports developing and deploying applications that comply with the OSGi Service Platform specification.

The OSGi Service Platform provides a mechanism for developing applications by using a component model and deploying those applications into a framework as OSGi bundles. An OSGi bundle is the unit of deployment for an application component and contains version control information, dependencies, and application code. The main benefit of OSGi is that you can create applications from reusable components that are accessed only through well-defined interfaces called OSGi services. You can also manage the life cycle and dependencies of Java applications in a granular way.

The IBM CICS SDK for Java allows development of Java applications for any supported release of CICS. The SDK includes the Java CICS library (JCICS) to access CICS services along with examples to get started with developing applications for CICS. You can also use the tool to convert existing Java applications to OSGi.

The IBM CICS SDK for Enterprise Java (Liberty) is included as an option with CICS Explorer and supports packaging of Liberty applications into CICS bundles that can be deployed to CICS.

To download and install the latest Explorer SDK, and for more information, see CICS Explorer product documentation.

Gradle and Maven

As an alternative to the IBM CICS SDK for Java, you can define your projects as Gradle or Maven modules and express dependencies by referencing the Maven Central artifacts. You can then optionally package and deploy your application in a CICS bundle by using the CICS-provided Gradle or Maven plug-in.

Why use Gradle or Maven for CICS development?
  • Simplified dependency management with Maven Central artifacts: Java developers can add dependencies on the Java CICS APIs and other CICS libraries with a few lines of configuration.
  • More flexibility with the development environment: Gradle and Maven support is available in most Java IDEs, such as Eclipse, IntelliJ IDEA, and Visual Studio Code. Java developers can write application code in a familiar IDE.
  • Bundle deployment with ease and confidence at development time with the Gradle and Maven plug-ins (Requires the CICS bundle deployment API):
    • Java developers can redeploy a bundle into a CICS region within seconds, without the need for a zFS connection or to disable, discard, and reinstall the bundle manually.
    • Java developers can integrate CICS bundle build and deployment into their toolchain, saving lots of manual work.
    • The API ensures controlled access both to the CICS system definition data set (CSD) for BUNDLE definition installation and to the bundle directory on zFS so that system programmers can allow Java developers to deploy bundles without granting additional access.
What you can do with Gradle or Maven in CICS
  • Resolving compilation dependencies from Maven Central

    A list of CICS Java APIs and other libraries are provided on Maven Central under the com.ibm.cics group ID. Depending on your organization’s policy, you can either reference these artifacts directly from Maven Central, or have them mirrored to your enterprise repository by using repository managers such as Artifactory or Nexus.

  • Building and deploying CICS bundles by using Gradle or Maven plug-ins

    The Gradle and Maven plug-ins are open source and provided on GitHub (cics-bundle-maven and cics-bundle-gradle). You can use them to build CICS bundles and, when the CICS bundle deployment API is configured, to deploy CICS bundles. A subset of CICS bundle parts, including WAR files (.war), EAR files (.ear), and OSGi bundles (.jar), is supported.

    For instructions on how to configure CICS for the CICS bundle deployment API, see Configuring the CMCI JVM server for the CICS bundle deployment API.