Distributed: [AIX MacOS Linux Windows]

Installing, updating, and uninstalling the Java SDK

You can install a Java software development kit (SDK) by using IBM® Installation Manager Version 1.8.5 or later. Liberty can run with any compliant Java™ runtime environment (JRE) or Java SDK.

About this task

Important:

Java SE 17 is the recommended Java SDK because it provides the latest features and security updates. As an alternative to installing Java SE 17, you can install another supported Java SDK version. Liberty runs on any of the Java SE versions that are listed in the Java SE versions column of the Supported Java Releases table on the Open Liberty website.

  • The Liberty end of support date for Java SE 8 is October 2026, fix pack 26.0.0.10.
  • The Liberty end of support date for Java SE 11 is October 2026, fix pack 26.0.0.10.
  • The Liberty end of support date for Java SE 17 is October 2027, fix pack 27.0.0.10.
  • The Liberty end of support date for Java SE 21 is October 2029, fix pack 29.0.0.10.

Because Java SE 22 is not a Long-Term-Support (LTS) version of Java, Liberty will not support Java SE 22 after Java SE 23 is released.

For more information, see Removal notices.

Installation Manager supports two types of Java SDK offerings:
  • IBM Semeru Runtimes: These offerings are production-ready binary files that are built with the OpenJDK class libraries and the Eclipse OpenJ9 JVM.
  • Common IBM Java SDK: This offering is available only for Java 8. It is also used by WebSphere® Application Server traditional V9.0.

The following table lists the Java SDK offering names and IDs.

Table 1. IBM Java SDK offerings
Java SDK offering name Offering ID
IBM Semeru Runtime Certified Edition, Version 21 com.ibm.java.jdk.v21
IBM Semeru Runtime Certified Edition, Version 17 com.ibm.java.jdk.v17
IBM Semeru Runtime Certified Edition, Version 11 com.ibm.java.jdk.v11
IBM SDK, Java Technology Edition, Version 8 com.ibm.java.jdk.v8

You install and uninstall the Java SDK offerings by using the standard Installation Manager procedures. The architecture of the Java SDK offering is automatically selected based on your operating system.

Installing the Java SDK by using IBM Installation Manager

You can install the Java SDK either by using the Installation Manager GUI, from the command line, or by using a response file.

Procedure

Choose one of the following options:

  • Install the Java SDK by using the Installation Manager GUI

    Start the Installation Manager GUI, click Install, and choose a Java SDK offering.

    For information about installing by using the GUI, see Installing Liberty on distributed operating systems by using the GUI.

  • Install the Java SDK from the command line by running the imcl install command, similar to the following example:
    imcl.exe install com.ibm.java.jdk.v21
      -repositories http://www.ibm.com/software/repositorymanager/com.ibm.java.jdk.v21
      -installationDirectory "C:\Program Files\IBM\WebSphere\Liberty"
      -secureStorageFile C:\IM\credential.store -masterPasswordFile C:\IM\master_password.txt

    For more information about installing from the command line, see Installing Liberty on distributed operating systems using the command line.

  • Install the Java SDK by using a response file that is similar to the following example:
    <?xml version="1.0" encoding="UTF-8"?>
    <agent-input clean="true" temporary="true">
    <server>
    <repository location="http://www.ibm.com/software/repositorymanager/com.ibm.java.jdk.v21" />
    </server>
    <install modify='false'>
    <offering id='com.ibm.java.jdk.v21'
      profile='WebSphere Application Server Liberty'
      features='com.ibm.sdk.21'/>
    </install>
    <profile id='WebSphere Application Server Liberty' installLocation='C:\Program Files\IBM\WebSphere\Liberty'>
     <data key='eclipseLocation' value='C:\Program Files\IBM\WebSphere\Liberty' /> 
     <data key='cic.selector.arch' value='x86_64' /> 
    </profile>
    </agent-input>

Updating the Java SDK

For the IBM Java 8 SDK, individual fixes are packaged as fix packs that have an updated timestamp. Content in the individual fixes for IBM SDK, Java Technology Edition is cumulative, so the fixes contain the fix pack content for the specified level plus any maintenance before the fix. Because individual fixes are packaged as fix packs, no interim fixes are provided. All updates for the IBM Java SDKs are installed by following the method for installing and uninstalling fix packs that is described in Installing and uninstalling Liberty fix packs.

You can install the updates directly from the online service repository, or you can download the update files from IBM Fix Central for a local installation.

Uninstalling the Java SDK by using IBM Installation Manager

You can uninstall the Java SDK either by using the Installation Manager GUI, from the command line, or by using a response file.

Procedure

Choose one of the following options:

  • Uninstall the Java SDK by using the Installation Manager GUI
    Start the Installation Manager GUI, click Uninstall, and select the IBM SDK, Java Technology Edition offering to uninstall.

    For more information about uninstalling by using the GUI, see Uninstalling Liberty from distributed operating systems using the GUI.

  • Uninstall the Java SDK from the command line by running the imcl uninstall command, similar to the following example:
    imcl.exe uninstall com.ibm.java.jdk.v21
      -installationDirectory "C:\Program Files\IBM\WebSphere\Liberty"

    For more information about using the uninstall command, see Uninstalling Liberty from distributed operating systems using the command line.

  • Uninstall the Java SDK by using a response file that is similar to the following example:
    <?xml version="1.0" encoding="UTF-8"?>
    <agent-input clean='true' temporary='true'>
    <uninstall modify='false'>
    <offering id='com.ibm.java.jdk.v21' 
      profile='WebSphere Application Server Liberty'/>
    </uninstall>
    <profile id='WebSphere Application Server Liberty' 
      installLocation='C:\Program Files\IBM\WebSphere\Liberty'>
    </profile>
    </agent-input>

    For more information about uninstalling from a response file, see Uninstalling Liberty from distributed operating systems using response files.

What to do next

After you install, update, or uninstall a Java SDK, you can change the Java runtime environment that Liberty uses by setting the JAVA_HOME variable in your server.env file. Set the JAVA_HOME environment variable to the jre directory of the version that you want to use.

For Windows platforms
JAVA_HOME=C:path_to_Liberty\java\21.0
For LINUX platforms
JAVA_HOME=path_to_Liberty/java/21.0