CICS and Java
CICS® provides the tools and runtime environment to develop and run Java™ enterprise applications in a Java Virtual Machine (JVM) that is under the control of a CICS region. Java applications can interact with CICS services and applications written in other languages.
CICS provides a JVM server runtime environment for Java application development. You can develop, build, and deploy applications using the IBM® CICS SDK for Java, Gradle modules, or Maven modules.
IBM Semeru Runtime Certified Edition for z/OS Java 11Java 17Java 21
Java on z/OS® provides comprehensive support for running Java applications. CICS uses the IBM Semeru Runtime Certified Edition for z/OS Version 11.0.17.0, Version 17.0.7.0 or Version 21.0.4.0 as the minimum release level. Some Liberty features require specific Java versions, and these are called out in Liberty features. In addition, if any of your applications perform an RMI call, you must ensure you have the same Java level at client and run time.
The Certified Edition contains a Java Runtime Environment that supports the full set of Java APIs and a set of development tools. In Java 11, Java 17 and Java 21, 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.
To allow remote debug of a Java 11, Java 17 or Java 21 runtime (JVM) there is a
change to the syntax. The agentlib property now requires an explicit
hostname:port. Specifying the port alone is no longer enough to successfully
connect to and debug a Java 11, Java 17 or Java 21 runtime.
You need to download the Java 11, Java 17 and Java 21 version of the JZOS jar if your applications use it. To download the file, and for more information, see JZOS JAR for IBM Semeru Runtime Certified Edition for z/OS. To download and install the latest Explorer SDK, and for more information, see CICS Explorer® product documentation.
Java 21 In Java 21, the default character set for standard Java APIs is UTF-8, except for the console input and output encoding. Earlier versions of Java use an EBCDIC default character set. Processing of EBCDIC-based data is common in CICS Java applications so this change is significant. For more information, see File encoding and UTF-8 as default charset.
IBM 64-bit SDK for z/OS, Java Technology Edition Java 8
Java on z/OS provides comprehensive support for running Java applications. 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 the Liberty features table.
The SDK contains a Java Runtime Environment that supports the full set of Java APIs and a set of development tools. 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 z Systems® hardware. The IBM zEnterprise® Application Assist Processor (zAAP) can provide additional processor capacity to run eligible Java workloads, including Java workloads in CICS. You can find more information about Java on the z/OS platform and download the 64-bit version of the SDK at Java Standard Edition Products on z/OS.
CICS provides a JVM server runtime environment for Java application development. You can develop applications using the IBM CICS SDK for Java, Gradle modules, or Maven modules.
JVM server
- 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 using OSGi can be ported more easily between CICS and other platforms.
- Java EE applications can be deployed into the Liberty JVM
server.Note: OSGi applications 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 provides support for developing and deploying applications that comply with the OSGi Service Platform specification.
The OSGi Service Platform provides a mechanism for developing applications 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 though 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 Java EE, Jakarta EE and Liberty is included as an option with CICS Explorer and supports packaging of Liberty applications into CICS bundles that can be deployed to CICS.
Gradle and Maven modules
- Easy management of dependencies. Java developers can easily add the required versions of the Java CICS APIs and the CICS annotation processor to the Java dependencies with just a few lines of configurations.
- More freedom when choosing the development environment. Cradle and Maven support most Java IDEs, such as Eclipse, IntelliJ IDEA, and Visual Studio Code. Java developers can write application code in a familiar IDE.
- Better integration into a build toolchain. Cradle and Maven are, in nature, build tools, and they integrate smoothly with other automation tools such as Jenkins and Travis CI. The dependencies defined through Gradle or Maven are integrated into the build toolchain automatically.
The following artifacts are available on Maven Central:
- The Java CICS class library (JCICS)
- Provides the EXEC CICS API support for Java applications in CICS TS.
- The CICS annotations library and the CICS annotation processor
- Provides support that enables CICS programs to invoke Java applications in a Liberty JVM server.
- A bill of materials (BOM)
- Defines the versions of the other artifacts to ensure that they are at the same CICS TS level.
For more information about the artifacts and how to use them, see Developing applications using Maven or Gradle.
- org.osgi for OSGi framework
- net.wasdev.maven.tools.targets for Liberty APIs, SPIs, and Java EE specifications
You can either use these artifacts directly from Maven Central, or have them referenced as allowlisted dependencies from an enterprise repository by using repository managers such as Artifactory or Nexus.