Obtaining version information

You obtain the IBM® build and version number for your Java™ installation by using the -version or -fullversion options. You can also obtain version information for all jar files on the class path by using the -Xjarversion option.

Procedure

  1. Open a shell or command prompt.
  2. Type the following command:
    java -version
    From service refresh 5 fix pack 5, the output is similar to the following extract:Start of changes for service refresh 5 fix pack 5
    java version "1.8.0_151"
    Java(TM) SE Runtime Environment (build 8.0.5.5 - pxa6480sr5fp5-20171109_02(SR5 FP5))
    IBM J9 VM (build 2.9, JRE 1.8.0 Linux amd64-64 Compressed References 20171102_369060 (JIT enabled, AOT enabled)
    OpenJ9 - 7ade437
    OMR - 1b656cb
    IBM - 59c3d96)
    JCL - 20171109_01 based on Oracle jdk8u151-b12
    End of changes for service refresh 5 fix pack 5Most notably, the line starting OpenJ9 replaces the lines J9VM and JIT in the output from earlier refreshes, because these components are now contributed to the Eclipse Foundation under the Eclipse OpenJ9 project.
    Before service refresh 5:
    java version "1.8.0"
    Java(TM) SE Runtime Environment (build pap3280-20140729_01(SR1))
    IBM J9 VM (build 2.8, JRE 1.8.0 AIX ppc-32 20140725_207966 (JIT enabled, AOT enabled)
    J9VM - R28_jvm.28_20140725_0202_B207966
    JIT  - tr.r14.java_20140714_68218.03
    GC   - R28_jvm.28_20140725_0202_B207966
    J9CL - 20140725_207966)
    JCL - 20140722_01 based on Oracle jdk8u20-b20
    The output provides the following information:
    • The first line indicates the Java standard edition class library level.
    • The second line includes information about the build level of the runtime environment. Service refresh (SR), fix pack (FP), and APAR (Interim fixes only) numbers are appended to the build string.
    • The third line indicates the build level of the Java virtual machine.
    • Subsequent lines provide detailed information about the levels of components that make up the runtime environment.
    Exact build dates and versions change for service refreshes and fix packs.
  3. To obtain only the build information for the runtime environment, type the following command:
    java -fullversion
    System output that is similar to the following extract is displayed:
    java full version "JRE 1.8.0 IBM Windows 64 build 
       pwa6480-20170614_01"

What to do next

You can also list the version information for all available jar files on the class path, the boot class path, and in the extensions directory. Type the following command:
java -Xjarversion -version
System output that is similar to the following extract is displayed:
java version "1.8.0_141"
Java(TM) SE Runtime Environment (build pxi3280sr5-20170614_01(SR5))
IBM J9 VM (build 2.9, JRE 1.8.0 Linux x86-32 20170612_352001 (JIT enabled, AOT enabled)
J9VM - 19c7794
JIT  - tr.open_20170612_104744_b26aea0
OMR  - 559b08c)
JCL - 20170613_01 based on Oracle jdk8u141-b11
/opt/ibm/java-i386-80/jre/lib/se-service.jar
/opt/ibm/java-i386-80/jre/lib/cuda4j.jar
/opt/ibm/java-i386-80/jre/lib/math.jar
/opt/ibm/java-i386-80/jre/lib/ibmorb.jar
/opt/ibm/java-i386-80/jre/lib/ibmorbapi.jar
/opt/ibm/java-i386-80/jre/lib/ibmcfw.jar  VERSION: CCX.CF [o1537.01]
...
The information available varies for each jar file and is taken from the Implementation-Version and Build-Level properties in the manifest of the jar file.