Updating the Liberty Java runtime environment or software development kit

Updating to the latest Java™ version ensures that your Liberty environment receives new features and security fixes.

About this task

Liberty can run with any compliant Java runtime environment (JRE) or Java software development kit (SDK). This flexibility means that you have several options for installing the JRE or Java SDK:
Important: Liberty on z/OS supports Java SE 8.

As of version 22.0.0.9, Liberty on z/OS supports Java SE 11.

[23.0.0.12 and later]As of version 23.0.0.12, Liberty on z/OS supports Java SE 17.

[24.0.0.9 and later]As of version 24.0.0.9, Liberty on z/OS supports Java SE 21.

[26.0.0.3 and later]As of version 26.0.0.3, Liberty on z/OS supports Java SE 25.

When support ends for your Java SE version, you must upgrade to a supported version.
  • The first Liberty release that does not support Java SE 8 is 29.0.0.1.
  • The first Liberty release that does not support Java SE 11 is 27.0.0.10.
  • [23.0.0.12 and later]The first Liberty release that does not support Java SE 17 is 27.0.0.10.
For more information, see Removal notices. After support is removed, the Liberty kernel is recompiled and can no longer run with the removed Java version.

Procedure

  1. Update your Liberty installation to at least the minimum fix pack that supports the Java version. The more recent the fix pack, the more features and fixes are included.
    Important:

    The z/OS® platform supports Java SE 8.

    The z/OS platform supports Java SE 11.

    [23.0.0.12 and later]The z/OS platform supports Java SE 17.

    [24.0.0.9 and later]The z/OS platform supports Java SE 21.

    [26.0.0.3 and later]The z/OS platform supports Java SE 25.

    Open Liberty Thanks to Liberty zero-migration architecture, you can update your installation with minimal impact to your current applications and configuration. For more information about Liberty zero-migration architecture, see Zero-migration architecture on the Open Liberty website.

    For more information, see Installing Liberty interim fixes and fix packs on z/OS operating systems.

  2. Update the JRE or Java SDK by using one of the following options.
    • If you installed Liberty by using Installation Manager, you can also use it to install and update IBM Java SDKs. If you use IBM Java, install one of the common IBM Java SDKs, such as IBM SDK, Java Technology Edition, Version 8. The IBM SDKs receive security updates faster than the older WebSphere Java SDKs because they are not on the WebSphere fix pack schedule. The IBM Java 8 SDK is also used by WebSphere Application Server traditional V9.0.

      For more information about installing IBM Java SDKs by using Installation Manager, see Installing IBM SDK, Java Technology Edition on z/OS.

    • Install a separately downloaded JRE or Java SDK. You can install any specification-compliant JRE or Java SDK of a supported Java version.
      After you install the JRE or Java SDK, change the Java level that Liberty uses by setting the JAVA_HOME variable.
      Tip: You can specify the Java SDK or JRE location on the JAVA_HOME property in the server.env file, as described in Customizing the Liberty environment. When you set the JAVA_HOME property in the server.env file, Liberty uses the same Java runtime location regardless of the user profile that the Liberty server runs under.
      Alternatively, you can set the JAVA_HOME variable on your operating system:
  3. Check for any deprecations or incompatibilities by scanning your applications with the Migration Toolkit.

    In most cases, Java SE specifications are upwards binary-compatible with previous Java SE versions except for the incompatibilities and deprecations that are documented in the Oracle Compatibility Guide for JDK 8 and Java SE 7 and JDK 7 Compatibility.

    Important: Java SE 11 introduced significant breaking changes, primarily the removal of Java EE and CORBA APIs.
    The Migration Toolkit consists of two separate tools, the Migration Toolkit for Application Binaries and the Eclipse-based WebSphere Application Server Migration Toolkit.
    • The application binary scanner provides a detailed migration analysis report for your application, so you can better understand the type and scope of changes that the application might require.
    • When you migrate your applications, the Eclipse-based Migration Toolkit provides quick fixes to automatically update your source when possible and provides detailed help for items that must be manually updated.