IBM Support

IBM Java for AIX FAQ: Identifying the Java versions and Java installation locations for an AIX system

Question & Answer


Question

IBM Java for AIX FAQ: Identifying the Java versions and Java installation locations for an AIX system

Answer

This document provides instructions to identify and show the locations and versions of IBM Java for AIX installed or being used on AIX systems (or LPARs). These instructions can be used to identify a Java single installation or all Java installations on an AIX system.

If the location of the Java command is already known, please proceed directly to Step C. Display Version Details.

When contacting IBM Support for additional assistance, please be prepared to provide confirmation that all of the steps discussed in this document have been completed and information requested in Step E. Getting Support has been collected and upload.

Special Notes:
Java 6 goes out of support Sept 2017. Prepare now!
Java 5 is out of support and should be removed per the Java 5 Uninstall web page.
Java 1.4 is out of support and should be removed per the Java Uninstall web page.


This document will only provide instructions for in-supported versions of IBM Java for AIX.
Overview
Details


Overview


Multiple releases of multiple versions of IBM Java for AIX can be installed in many different locations in an AIX system or LPAR. These locations can include:

1. In the default AIX fileset locations (e.g., /usr/java*)
2. Embedded within the installation of another product (e.g., WebSphere Application Server, WebSphere MQ, Tivoli, Lotus Domino, DB2, Oracle WebLogic, SAS, etc)
3. In a file system mounted from a remote server
4. Any directory on the system

Also, the version naming convention used for IBM Java for AIX is associated with the following release details:

1. The AIX fileset level (e.g., 6.0.0.535)
2. The IBM Java FixCentral level (e.g., 8.0.1.10)
3. The Java build string (e.g., pap3280sr3fp10-20160720_02)
4. The Java service refresh (SR) and fixpack (FP) level (e.g., Java 6 SR 16 FP 20)


Identifying the Java locations and versions details is a three (3) step process:

1. Identify the full path of the java command being used (go to Step A. Indentification Methods)
2. Display the version information for identified command (go to Step C. Displaying Version Details)
3. Cross match your version information with the IBM AIX Java Service Information and Download web page for complete version details (go to Step D. Cross Reference Version Details)



**Important Notices - Please Read **

1. For users contacting IBM Support for assistance, a basic level of knowledge for working with AIX (or UNIX) will be expected. Furthermore, it will be expected that users can read, understand, and follow the basic instructions outlined in this document. The IBM support specialist assigned to the support call may request that you confirm you have read, understood, and completed all of the steps in this document to accurately determine the location of the java command (installation) being used.

2. Users should not assume that typing java -version on the command line will display the intended version of Java being used. Users who are unfamiliar with the concept of the UNIX PATH environment variable are likely to experience inconsistent results since the java version information displayed is likely to be associated with the first java command found in the PATH search list, not the intended java command (e.g., in the current directory).


3. If executing the command java -version results in a messsage similar to:

java: not found

this is an indication that your PATH variable is not correctly configured or you need to specify the full path to the java command.


Step A.

Identification Methods


The first step to identifying the IBM Java for AIX version information is to identify the correct full path (i.e., where it is installed on the system) to the java command being used.

There are several commands, files, and techniques which can be used to determine the full path of the desired java command:

1. Looking at the current process table (e.g., ps command)
2. Using the current workking directory of an active process (e.g., procwdx command)
3. Matching the path for well defined paths (e.g., the default location for IBM AIX Java filesets)
4. Searching installed filesets (e.g., lslpp command)
5. Reviewing IBM Java diagnostic files (e.g., javacore.####.###.###.###.txt files)
6. Performing a simple command line search for the java command in specific directories or system wide (e.g., find command)

Details are provided below for each of the techniques. Please follow the instructions for each technique until the correct full path has been identified. Once the correct full path has been identified, then proceed to Step C: DisplayVersion Details to identify the Java version.


Step A.1

Using the Process Table


In cases when the version information is desired for an active process, it may be possible to obtain the full path to the java command by executing the following commands from a command prompt:

{in the example below, replace PATTERN with any text such as process id or a string that uniquely identifies the active process}

# ps avwwwg | egrep "java|PATTERN" | grep -v grep | awk '{print $1,$13}'

For example:

# ps avwwwg | egrep "java|server1" | grep -v grep | awk '{print $1,$13}'

28508342 /usr/java6/bin/java
45940864 java


For the results shown in your terminal window, determine if the full path is provided for the desired active process.

In the example above, there were two matching processes; one with the full path (e.g., /28508342 /usr/java6/bin/java) and one without a full path (e.g., 45940864 java).

If the correct full path can be identified, proceed to Step C: DisplayVersion Details to identify the Java version.

If there is an active process, but it does not include the full path, proceed to Step A.2: Using the Current Working Directory.


Step A.2

Using the Current Working Directory


In cases when there is an active processs in the process table does not show the full path, it may be possible to obtain the full path by viewing the current working directory (cwd) of the active process.

To view the current working directory of an active process, run the following commands from a command prompt:

{in the example below, replace JAVA_PID with the active Java process id shown by the "ps" command}

# CWD="$( procwdx JAVA_PID | awk '{print $NF}' )"
# ls ${CWD}/java ${CWD}/jre/bin/java 2>&1 | sed -e "s|\(.*\) not found|NOT_FOUND: \1|g" -e "s|^/|FOUND: /|g"


For example #1 (current working directory is the correct path):

# CWD="$( procwdx 45940864 | awk '{print $NF}' )"
# ls ${CWD}/java ${CWD}/jre/bin/java 2>&1 | sed -e "s|\(.*\) not found|NOT_FOUND: \1|g" -e "s|^/|FOUND: /|g"

NOT_FOUND: /some_path/java
FOUND: /some_path/jre/bin/java


the full path of the java command was was identified by the "FOUND" tag (e.g., FOUND: /some_path/jre/bin/java)


For example #2 (curent working directory is not the correct path):

# CWD="$( procwdx 213412213 | awk '{print $NF}' )"
# ls ${CWD}/java ${CWD}/jre/bin/java 2>&1 | sed -e "s|\(.*\) not found|NOT_FOUND: \1|g" -e "s|^/|FOUND: /|g"

NOT_FOUND: /some_path/java
NOT_FOUND: /some_path/jre/bin/java


the full path of the java command could not be identified since both entries were reported with the "NOT_FOUND" tag.


If the correct full path can be identified, proceed to Step C: DisplayVersion Details to identify the Java version.


Step A.3

Using Default Locations


When IBM Java for AIX is installed and used from the standard AIX installation images (e.g., installed using the installp or smitty commands), the different versions will be installed into their own default location. There is a default location for each version and architecture (e.g., 32bit or 64bit).

Use the following table to cross reference the default location with the desired version:

Java Version 32-bit Full Path 64-bit Full Path lslpp -l Command Output
IBM Java 8.0 (1.8.0) /usr/java8/jre/bin/java /usr/java8_64/jre/bin/java Java8.jre / Java8_64.jre
IBM Java 7.1 (1.7.1) /usr/java71/jre/bin/java /usr/java71_64/jre/bin/java Java71.jre / Java71_64.jre
IBM Java 7.0 (1.7.0) /usr/java7/jre/bin/java /usr/java7_64/jre/bin/java Java7.jre / Java7_64.jre
IBM Java 6.0 (1.6.0) /usr/java6/jre/bin/java /usr/java6_64/jre/bin/java Java6.sdk / Java6_64.sdk









If the correct full path can be identified, proceed to Step C: DisplayVersion Details to identify the Java version.


Step A.4

Matching Installed AIX Fileset Level


If the Java installation is known to be associated with a default IBM Java for AIX installp image (see table in Step A.3: Using Default Locations), the full java path can be identified by running the following commands from a command prompt. Once the AIX fileset name (e.g., Java8.jre, Java71_64.jre, Java7.jre, Java6_64.sdk, etc) has been identified, cross reference that name to the names in table shown in Step A.3: Using Default Locations.

a. Identifying IBM Java 8.0 (1.8.0)

# lslpp -l "Java8.*jre" "Java8_*jre"


b. Identifying IBM ava 7.1 (1.7.1)

# lslpp -l "Java71.*jre" "Java71_*jre"


c. Identifying IBM Java 7.0 (1.7.0)

# lslpp -l "Java7.*jre" "Java7_*jre"


d. Identifying IBM ava 6.0 (1.6.0)

# lslpp -l "Java8.*jre" "Java8_*jre"



If the correct full path can be identified, proceed to Step C: DisplayVersion Details to identify the Java version.


Step A.5

Using IBM Java Diagnostic Files


One of the diagnostic capabilities of IBM Java for AIX is to create detailed thread dump files called javacore files. These javacore files contain the location of the full path of the java command being used at the time the file was created.

To generate a javacore diagnostic file and identify the full java command, perform the following steps:

Note: if there is an existing javacore file, please proceed to step 3 below.

1. Identify the active Java process using the ps command, then run the following command from a command prompt:

{replace JAVA_PID with the active process id}

# kill -3 JAVA_PID

2. Locate the javacore file that was created.

If you do not know the location that the javacore files are created, please follow the instructions on the following web page for detailed instructions for locating the file.

IBM Java for AIX FAQ: Identifying and Changing the Location for Diagnostic Files

3. Extract the full java path from the javacore file by running the following commands from a command prompt:

{replace JAVACORE*TXT will the full path and name of the javacore file}

# grep 1CICMDLINE JAVACORE*TXT | awk '{print $2}'


If the correct full path can be identified, proceed to Step C: DisplayVersion Details to identify the Java version.


Step A.6

Command Line Search


In cases when the full java path can not be identified using the above methods, it may be necessary to simply perform a command line search using the find command.

Running the find command from the root (/) directory has the potential of taking a long time for systems with many local and remote file systems. Therefore it is recommended to identify a directory (if possible) that may contain the java command to reduce the impact and time.

Also, if the find command is executed without the correct authorization (incorrect id), it may not find the java command.

To use the find command, run the following command from a command prompt using the correct id (e.g., root user):

a. To search the entire system

# find / -type f -name java -ls

b. To search with a specific directory (e.g., DIRSPEC would be replaced with the specific directory or directories)

# find DIRSPEC -type f -name java -ls

Since one or more releases of Java can be installed, the above commands are likely to find multiple locations. Assess each result to determine the correct location.


If the correct full path can be identified, proceed to Step C: DisplayVersion Details to identify the Java version.


Step B

Cannot Find Java


If the correct path of the Java command cannot be located after completing all of the above steps, consider using these resources:


a. Contact your system administrator
b. Contact your application developer and/or application administrator.
c. Review application log files


Step C

Display Version Details


Once the full path to the java command has been identified, display the Java version by running the following commands from the command line:

{replace FULLPATH with the full path of the java command identified in the above steps}

# FULLPATH/java -version 2>&1 | grep "SE .*build" | awk '{print $NF}' | sed -e "s|[()]| |g"

(e.g., /usr/java8/jre//java -version 2>&1 | grep "SE .*build" | awk '{print $NF}' | sed -e "s|[()]| |g" )

The output displayed will be similar to the lines shown below but specific to the versions and releases you have installed.

{the following build strings are examples only, the actual values shown are expected to be different}


a. Java 8.0 (1.8.0)

32-bit-> pap3280sr3fp10-20160720_02 SR3fp10
64-bit-> pap6480sr3fp10-20160720_02 SR3fp10

b. Java 7.1 (1.7.1)

32-bit-> pap3270_27sr3fp50-20160720_02 SR3fp50
64-bit-> pap6470_27sr3fp50-20160720_02 SR3fp50

c. Java 7.0 (1.7.0)

32-bit-> pap3270sr9fp50-20160720_02 SR9fp50
64-bit-> pap6470sr9fp50-20160720_02 SR9fp50


d. Java 6.0 (1.6.0)

32-bit-> pap3260sr16fp30-20160726_01 SR16fp30
64-bit-> pap6460sr16fp30-20160726_01 SR16fp30


In the output shown in your command window, the first (left) value (e.g., pap6470sr9fp50-20160720_02) is the build string and the second (right) value (SR9fp50) is the service refresh/fixpack value.


Once the Java build and service refresh details are identified , proceed to Step D. Cross Reference Version Details.


Step D

Cross Reference Version Details


Once the Java build (e.g., pap* string) and/or the Java service refresh / fix pack detail (e.g., SR3 FP10) have been identified (see Step C. Display Version Details), visit the following web page:

IBM AIX Java Service Information and Download

While viewing the above web page in the browser, use the browser page search feature (usually the Ctrl+F or Command+F key sequences) to search on the Java build string to identify all of the version details for that release. On the download web page, the version details include:

a. A link to download the specific release
b. The APAR # (AIX update record identifier)
c. The Java build string that includes the date that the release was created
d. The AIX fileset level (e.g., lslpp)
e. The Java service refresh / fixpack level
f. The Java FixCentral (Java update download site) level (a.k.a., Java fileset level)

Users can also determine if there are newer updates for the installed Java versions that should be downloaded and installed. For assistance with downloading and installing newer updates, follow the instructions on the IBM Java for AIX download and installation web page.


If the build string can not be located on the download web page, please double check the steps, verify the build string starts with "pap", then ensure that the steps were performed on the AIX operating system (and not another UNIX system).


Step E

Contact IBM Support


If, after completing all of the above steps, the location and/or version can not be identified, please take these actions:


1. Contact IBM to open a new IBM Support Call with the "IBM AIX Java team"


2. When opening the support call, confirm that you have completed all steps in this document.


3. Collect and package the following data to your IBM Support Call (a.k.a. PMR)

a. A text file containing details of which steps you do not undersand and why
b. A text file containing the exact commands executed, the output, and all error messages
c. A text file containing a description of the application framework (e.g., Websphere, Tivoli, DB2, Oracle, etc)
d. An AIX system snap (e.g., the command "snap -ac")


4. Upload the packaged data following the instructions on this web page:

IBM Java for AIX MustGather: How to upload diagnostic data and testcases to IBM


Section 13

Section 14

Section 15

Section 16

Section 17

Section 18

Section 19

Section 20

Section 21

Document Type: Technical Document
Content Type: General
Hardware: all Power
Operating System: all AIX Versions
IBM Java: all Java Versions
Author(s): Roger Leuckie
Reviewer(s): NA

[{"Product":{"code":"SG9NGS","label":"IBM Java"},"Business Unit":{"code":null,"label":null},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
17 June 2018

UID

isg3T1024496