Installing Java on your IBM i server

Installing IBM® Developer Kit for Java™ allows you to create and run Java programs on your system. The Java Virtual Machine (JVM) included in IBM Developer Kit for Java is the IBM Technology for Java Virtual Machine and is available in both 32-bit and 64-bit versions.

IBM Technology for Java Virtual Machine is included in licensed program 5770-JV1. Licensed program 5770-JV1 is shipped with the system CDs. To access the IBM Technology for Java option, perform the following steps:
  1. Enter the Go Licensed Program (GO LICPGM) command and select Option 10 (Display)
  2. If you do not see this licensed program listed, then perform the following steps:
    1. Enter the GO LICPGM command on the command line.
    2. Select Option 11 (Install licensed program).
    3. Choose Option 1 (Install) for licensed program (LP) 5770-JV1 *BASE, and select the option that you want to install.
  3. Load the latest Java PTF group. This step is optional although recommended. For more information, see Applying program temporary fixes.
  4. Set the JAVA_HOME environment variable to the home directory of the Java Development Kit that you want to use. At a command line, enter one of the following commands:
    1. ADDENVVAR ENVVAR(JAVA_HOME) VALUE('/QOpenSys/QIBM/ProdData/JavaVM/jdk60/32bit')
    2. ADDENVVAR ENVVAR(JAVA_HOME) VALUE('/QOpenSys/QIBM/ProdData/JavaVM/jdk60/64bit')
    3. ADDENVVAR ENVVAR(JAVA_HOME) VALUE('/QOpenSys/QIBM/ProdData/JavaVM/jdk70/32bit')
    4. ADDENVVAR ENVVAR(JAVA_HOME) VALUE('/QOpenSys/QIBM/ProdData/JavaVM/jdk70/64bit')
    5. ADDENVVAR ENVVAR(JAVA_HOME) VALUE('/QOpenSys/QIBM/ProdData/JavaVM/jdk71/32bit')
    6. ADDENVVAR ENVVAR(JAVA_HOME) VALUE('/QOpenSys/QIBM/ProdData/JavaVM/jdk71/64bit')
    7. ADDENVVAR ENVVAR(JAVA_HOME) VALUE('/QOpenSys/QIBM/ProdData/JavaVM/jdk80/32bit')
    8. ADDENVVAR ENVVAR(JAVA_HOME) VALUE('/QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit')
If you are unsure what JVM you currently using, you can check using the following methods. If you see IBM J9 VM in the result, you are using IBM Technology for Java.
  • Look in the job log for the job containing the JVM. There will be a message that states what JVM you are using.
  • As part of the Java command you are using to run your application, add -showversion. You will see one additional line that shows the JVM you are using.
  • From qsh or qp2term, run java -version.