Question & Answer
Question
How do you download, install, and use Java 21 on the IBM i OS?
Answer
IBM Technology for Java 21 is now generally available on IBM i 7.6.
For IBM i 7.6 OS, the 5770JV1 Option 21 LPP is included with the IBM i OS Standard Set Media disc, B_GROUPx_05.
PRE-REQUISITES
- IBM i 7.6 OS
- SF99965 level 1 or higher
HOW TO DOWNLOAD 5770JV1 OPTION 21
1) Open a web browser and go to the URL, https://www.ibm.com/servers/eserver/ess/landing/index.html.
2) Click the Log in blue button.
If the blue Log in button is not displayed, you might already be signed in and can skip step 3.
3) Sign in with your IBM ID registered with your IBM i SWMA contract.
4) At the top of the page, hover your mouse over My Entitled Software and click Software Downloads.

5) Change the Category to IBM i. Change the Group to the appropriate IBM i OS VRM (7.6). Then, click the magnifying glass to the right of the Group field to display product information.
This screen capture shows IBM i 7.6 OS selected.

6) Check the box next to 5770-SS1 for IBM i and click the blue Continue button.

7) Select your specific LPP language. Default Language is "Lang Grp 1 Americas/Europe". Then, click the blue Continue button.
8) After the Current products are displayed, the "5861: i7.6 B_GROUP1 v07.06.00,ENU,DVD" Download Package should also be displayed. If you don't see this package, click the details link for 5770-SS1 IBM i to see the packages.

9) Click the packages link next to "5861: i7.6 B_GROUP1 v07.06.00,ENU,DVD" to expand the individual discs for the package.

10) Scroll down and check the box next to appropriate item based on your IBM i OS VRM.
Select the "B_GROUPx_05_IBM_i_RS_760-00" item and click the blue Continue button.

11) Review the license terms. If you agree to the license terms, click the blue I agree button.
12) Select your download method. If Java is installed on your PC, IBM recommends to select Download Director. Otherwise, select the "Download using your browser (HTTPS)" download method.
13) Click the blue Download now button (Download Director option). If this download option does not work, click the Back button and choose the "Download using your browser (HTTPS)" download method.
For the HTTPS download option, click the B_GROUPx_05_IBM_i_RS_760-00_LCD8_2956_00.udf.ZIP hyperlink to download the .zip file.

14) Clicking the link will download a .zip file containing an ISO image of the B_GROUPx_05 disc containing the 5770JV1 Option 21 installation media. Refer to the URL, https://www.ibm.com/docs/en/i/7.6.0?topic=reference-media-labels-their-contents, for detailed information on the IBM i 7.6 LPPs included on the B_GROUPx_05 disc.
HOW TO INSTALL 5770-JV1 OPTION 21 LPP ON THE IBM I OS
You will want to first download the .zip file to your PC per the instructions above, create the directory /jdk21 (MKDIR '/jdk21') on your IBM i server, and transfer the .zip file to the IFS directory, /jdk21, you just created. This can be done using a mapped network drive, FTP, or IBM i Nav IFS connection).
Please refer to the following file names based on your IBM i OS VRM.
IBM i 7.6: B_GROUPx_05_IBM_i_RS_760-00_LCD8_2956_00.udf.ZIP
Then, extract the ISO/UDF image file to the IFS.
1) STRQSH
2) cd /jdk21
3) jar xvf B_GROUPx_05_IBM_i_RS_760-00_LCD8_2956_00.udf.ZIP
4) F12
2) cd /jdk21
3) jar xvf B_GROUPx_05_IBM_i_RS_760-00_LCD8_2956_00.udf.ZIP
4) F12
Once the ISO/UDF image file have been extracted from the .zip files, use the instructions below for installing JDK 21 using an image catalog from an IBM i CL command line.
5) CHGOPTA EXTMEDFMT(*YES)
Important Note: The CHGOPTA command must be issued before the LODIMGCLG command shown below. If it is issued after the LODIMGCLG command, you will need to re-load the catalog.
Important Note: The CHGOPTA command must be issued before the LODIMGCLG command shown below. If it is issued after the LODIMGCLG command, you will need to re-load the catalog.
6) CRTIMGCLG IMGCLG(jdk21) DIR('/jdk21/IMAGE') CRTDIR(*YES)
7) ADDIMGCLGE IMGCLG(jdk21) FROMFILE('/jdk21/B_GROUPx_05_IBM_i_RS_760-00_LCD8_2956_00.udf') TOFILE(*fromfile)
8) CRTDEVOPT DEVD(OPTVRT01) RSRCNAME(*VRT) NOTE: If the OPTVRT01 device description already exists, please continue to the next step.
9) VRYCFG CFGOBJ(OPTVRT01) CFGTYPE(*DEV) STATUS(*ON)
10) LODIMGCLG IMGCLG(jdk21) DEV(OPTVRT01)
11) Ensure the B_GROUPx_05_IBM_i_RS_760-00_LCD8_2956_00 image is mounted in WRKIMGCLGE IMGCLG(jdk21).
You can enter option 6 next to the image to mount it.
12) RSTLICPGM LICPGM(5770JV1) OPTION(21) RSTOBJ(*PGM) DEV(OPTVRT01)
13) Finally, download and install the latest IBM i Java Group PTF to complete the LPP installation.
IBM i 7.6 - SF99965 level 1 or later
HOW TO USE JAVA 21 64 BIT ON THE IBM I OS
In order to use Java 21 64 bit on the IBM i OS, the JAVA_HOME environment variable will need to be set to /QOpenSys/QIBM/ProdData/JavaVM/jdk21/64bit.
JAVA_HOME=/QOpenSys/QIBM/ProdData/JavaVM/jdk21/64bit
Examples of how to set the JAVA_HOME environment variable:
- To change the default JDK system-wide to JDK 21 64 bit
- ADDENVVAR ENVVAR(JAVA_HOME) VALUE('/QOpenSys/QIBM/ProdData/JavaVM/jdk21/64bit') LEVEL(*SYS)
- To change the current job to JDK 21 64 bit
- ADDENVVAR ENVVAR(JAVA_HOME) VALUE('/QOpenSys/QIBM/ProdData/JavaVM/jdk21/64bit') LEVEL(*JOB)
- To change the current Qshell session to use JDK 21 64 bit
- export JAVA_HOME=/QOpenSys/QIBM/ProdData/JavaVM/jdk21/64bit
Related Information
[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CH5AAM","label":"Java Development Kit"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.6.0;and future releases"}]
Was this topic helpful?
Document Information
Modified date:
18 April 2025
UID
ibm17231371