IBM Support

How To Verify the IBM i Java Development Kit Is Functioning Properly?

Troubleshooting


Problem

This document shows how to test the functionality of Java after installation.

Environment

IBM i; IBM i Java Development Kit
IMPORTANT!!! After April 30th, 2024, IBM i 7.1 and earlier OS versions are no longer supported by IBM. As a result, no support is provided for the IBM JDK running on IBM i 7.1 and earlier OS versions.
IBM i 7.3, 7.2 OS and earlier OS versions have reached end of program support. For the IBM i 7.3 and 7.2 OS versions, a valid service extension contract must be purchased and active for the OS in order to obtain any level of support for any IBM JDK version. IBM i 7.1 and earlier OS versions are no longer supported by IBM and thus no support is available for the IBM JDK. See the "Supported IBM Java Development Kit (JDK) Versions by IBM i Operating System Version and Release" document for more information.

Resolving The Problem

This document shows how to test the functionality of the different IBM Developer Kit for Java products on the IBM i operating system.

1.

Determine which Java Developer Kits are installed. Type DSPSFWRSC and scroll down to 5770JV1
2.
You should see output similar to the following. You might find that you have some or all of the Java Developer Kits. From this list, determine which Java Developer Kits can be tested.

5770JV1   *BASE    2924    IBM Developer Kit for Java
5770JV1   14       5114    Java SE 7 32 bit  
5770JV1   15       5115    Java SE 7 64 bit
5770JV1   16       5116    Java SE 8 32 bit
5770JV1   17       5117    Java SE 8 64 bit
5770JV1   19       5119    Java SE 11 64 bit 
5770JV1   20       5119    Java SE 17 64 bit
3. To test Java for each of the Java Developer Kits, use the RUNJVA command or use the java command in QSH. If everything is working correctly, QIBMHello will be returned for each command.

RUNJVA Technique


To test the IBM Technology for Java VM JDKs, an environment variable is required to be added first.
 
1. On the operating system command line, type the following:

ADDENVVAR ENVVAR(JAVA_HOME) VALUE('/QOpenSys/QIBM/ProdData/JavaVM/jdkXX/YYbit')

Where...
XX = 70, 71, 80, 11, or 17
YY = 32 or 64

Press the Enter key.
2.
On the operating system command line, type the following:

RUNJVA CLASS(QIBMHello)

 
QIBMHello                          
Java program completed            



QSH java Technique

To test the IBM Technology for Java VM JDK in Qshell, this requires the execution of the export command first.

 
1. Type export JAVA_HOME=/QOpenSys/QIBM/ProdData/JavaVM/jdkXX/YYbit and press the Enter key.

Where...
XX = 70, 71,  80, 11, or 17
YY = 32 or 64
2.
Type java -showversion QIBMHello and press the Enter key.
Example:
> java -showversion QIBMHello                                                                                           
                                                                                                   
  java version "1.8.0_331"                                                                                              
  Java(TM) SE Runtime Environment (build 8.0.7.10 - pap6480sr7fp10-20220505_01(SR7 FP10))                               
  IBM J9 VM (build 2.9, JRE 1.8.0 OS/400 ppc64-64-Bit Compressed References 20220401_26248 (JIT enabled, AOT enabled)   
  OpenJ9   - 255b7d9                                                                                                    
  OMR      - 3671a9f                                                                                                    
  IBM      - 1b0232b)                                                                                                   
  JCL - 20220504_01 based on Oracle jdk8u331-b09                                                                        
                                                                                                                        
  QIBMHello                                                                                                             
  $                                                                                                                    

[{"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":"All Versions"}]

Historical Number

482414458

Document Information

Modified date:
01 October 2024

UID

nas8N1013778