Implementing Java on AIX: Download, installation, and configuration

Get short, simple, and complete instructions for downloading, installing, and configuring Java™ for the IBM® AIX® operating system from the IBM Systems™, UNIX® and ISV Technical Support Team for AIX and Java in Austin, Texas. If you take the steps in the article before contacting the support center for problems, you can save a lot of time and headaches.

IBM Java Support on AIX Technical Team (weiluo@us.ibm.com), Technical Support, IBM

This document was created by a previous team member, Roger Leuckie. This article is now maintained and updated by the IBM ztrans Java Support team. The update is based on ongoing AIX and JVM changes. If you have suggestions or comments, you can contact the team's lead at weiluo@us.ibm.com.



01 April 2008 (First published 31 March 2004)

Introduction

This article gives you complete instructions for downloading, installing, and configuring Java for AIX. If you thoroughly read and follow the instructions provided, you will save time and hassles when contacting the support center for help. They'll ask you to verify each of the following steps, so completing them prior to contacting the support center expedites your call.


IBM AIX Java page

The IBM developer kits for AIX, Java technology edition is the primary place for information and downloads for Java on AIX. Select the link Downloads, User Guides, and Service information at the bottom to download complete Java and the Java update package. This page also provides a link Diagnosis documentation.

You can jump to the session that you are interested in by clicking the following links:


IBM AIX Java download

Within the AIX Download and service Information, there is a table that contains all of the supporting Java products on AIX.

To download, go to the first row Where to get SDK base image and JRE and select a link for the desired Java product to download. You'll be prompted to register for an IBM account and password. If you already have a user ID and password, enter them to continue. After registering or logging in, you'll be asked to complete a survey and accept a license. After doing so, the Download and Service page specific to the version of Java you selected will be displayed. If you do not have a universal IBM user ID, please register now, then return to sign in for download.

Other rows in the table are:

Where to get SDK fixes (PTFs) Contains all maintenance releases information and download links; please click on it to check available fixes and download them.
Latest fixes listContains all defect information; each defect has a short explanation.
Latest README/ sdkguideContains Release Notes.
Minimum AIX release supported ...This information only applies to the newest Java build
End of serviceProvides information on when the particular version will be out of service; please pay attention to it and have a good plan in place to move the application to the supported Java products.

If you have problems accessing or viewing this page, contact your network or systems administrator to discuss your firewall or proxy settings. Usually they are the primary causes for not being able to access or use this page. During situations that the developerWorks (IBM Download and Server page) site is unavailable, you can contact IBM support to ask the support to FTP it to you if this is an urgent situation.

Java 1.1.8, 1.2.2, and 1.4.1 are no longer supported, but as a convenience to our users you may still download these out-of-service Java SDKs from AIX out-of-service downloads.

You will get SDK or update files in .tar or .tar.gz format. You have to extract them first before you can install them. To extract files, use either of the following commands:

tar -xvpf xxx.tar

gunzip -c < xxx.tar.gz | tar -xvpf -

IBM AIX Java new installation

Within the AIX Download and service Information, there is a table that contains all of the supporting Java products on AIX.

To download, go to the first row Where to get SDK base image and JREto download the Java build.

If you are going to install SDK using an installp image, check your system first to see if the same product has been installed on your machine:

lslpp -l | grep Java

For example, if you see the Java14.sdk fileset as the output of the above command, you have installed 32-bit Java142.

The following table provides information on fileset and the Java version on your machine:

VersionFilesetVersionFileset
32 Bit Java6Java6.*64-Bit Java6Java 6_64.*
32-Bit Java5Java5.*64 Bit Java5Java 5_64.*
32-Bit Java14Java14.*64-Bit Java14Java 14_64.*
32-Bit Java131Java131.*64-Bit Java131Java 131_64.*

Clicking on the link what versions of Java I have installed provides more information

Remember, you can download "tarball" JRE to install on your machine, but you can't update it using an APAR and you must download and install the complete JRE for each new release provided. And IBM doesn't support JRE installation, nor “tarball” installation.

After you extract the download file using the previous command, you should have installp files. To check the file format, run the following:

file < file name>

The output should be backup or restore format file.

Now you are ready to install Java using the following commands:

mkdir -p /tmp/java_home

cd /tmp/java_home

cp Java*  .

tar -xvpf Java*.tar

or

gunzip -c <Java*.tar.gz | tar -xvpf -

inutoc .

smitty installp

If the installation fails, remove the.toc file before you re-try.

Once the SMIT menu interface has been displayed, do the following:

  • For AIX 5 or AIX 6, select Install Software.
  • Enter ./ for "INPUT device / directory for software, then click Enter to continue.
  • With the cursor on SOFTWARE to install, click F4 to view and F7 to select the software to install
  • With the cursor on "ACCEPT new license agreements?", click Tab to accept the license agreement.
  • Then click Enter twice to begin the installation.

If the installation or upgrade returns with a failed status, go to the Troubleshooting section.


IBM AIX Java upgrade

To apply any update to a fileset, you must install the base fileset first. To install base filesets, reference IBM AIX Java New Installation.

There are two ways to download Java APARs.

  1. Go to AIX Download and service Information to download the Java APARs.
  2. Go to AIX Fix Central to download the APAR if you already know which APAR you want to download.

On the Fix Central page, do the following:

  • Select System p as the Product family.
  • Select AIX as the Product
  • Select the AIX version that is installed on your machine.
  • Select Fix search under Fix Type

Click on Continue. In the Search Fix window, enter the APAR number to search. Once the download link shows up, click on it to download the APAR.

Prior to updating Java on AIX, you must first verify if the AIX operating system has been updated to recommended levels. Go to the AIX Download and service information and read the information in the rows "Minimum AIX level supported" in the center of the table. If the AIX build is below the minimum AIX level supported, you need to update AIX before you continue.

To verify if an APAR has been installed, run the following command (replace APAR with actual APAR #):

instfix -ik APAR

To view the currently installed version of a fileset, run the following command:

lslpp -L "fileset"

For example, if you have java5 on your machine, you would run: lslpp -L Java5.sdk

To install the updated APAR, run the following command:

Smitty update

In the smitty session, choose the following:

  • Enter ./ for "INPUT device / directory for software, then click Enter to continue.
  • With the cursor on "FIXES to install," click F4 to view and F7 to select the software to install
  • With the cursor on "COMMIT software updates?", you can choose Yes or No. If you choose "Yes," the APAR installation is committed. You can't reject it back to the state before you applied this APAR. If you choose "No," you can later "reject" this APAR if it causes some issue.
  • Then click Enter twice to begin the installation.

After the updating, you have to run the following command to unload the old Java library so you can have a clean Java runtime environment:

slibclean

sync

We strongly recommend that you upgrade your SDK to the most recent build so that you'll have the most up-to-date JVM environment available, providing your applications are supported on that JVM.


IBM AIX Java configuration

Each SDK version is installed into its own default directory. Multiple Java versions can coexist on the system, but only one Java version is visible to a user.

To use a specific Java version, you have set up the PATH environment variable.

The PATH that is needed to set to use a specific Java version on the system are as follows:

Java versionPath setting
Java 1.1.8PATH=/usr/jdk_base/bin:$PATH
Java 1.2.2PATH=/usr/java_dev2/jre/sh:/usr/java_dev2/sh:$PATH
Java 1.3.0PATH=/usr/java130/jre/bin:/usr/java130/bin:$PATH
Java 1.3.1 64-bitPATH=/usr/java13_64/jre/bin:/usr/java13_64/bin:$PATH
Java 1.3.1 32 bitPATH=/usr/java131/jre/bin:/usr/java131/bin:$PATH
Java 1.4 64-bitPATH=/usr/java14_64/jre/bin:/usr/java14_64/bin:$PATH
Java 1.4 32 bitPATH=/usr/java14/jre/bin:/usr/java14/bin:$PATH
Java 5 32-bitPATH=/usr/java5/jre/bin:/usr/java5/bin:$PATH
Java 5 64-bitPATH=/usr/java5_64/jre/bin:/usr/java5_64/bin:$PATH
Java 6 32-bitPATH=/usr/java6/jre/bin:/usr/java6/bin:$PATH
Java 6 64-bitPATH=/usr/java6_64/jre/bin:/usr/java6_64/bin:$PATH

A script called javaenv is provided at ftp://ftp.software.ibm.com/aix/tools/javatools/diagnostic/javaenv, and you can use it to verify the Java installation. This script only works for the Korn shell (ksh) environment. Save the file into the /tmp directory, then run the following commands:

cd /tmp

chmod 755 javaenv

. /tmp/javaenv <java_home>

java -version

Replace <java_home> with the Java base installation directory, such as /usr/java14 for Java142 and /usr/java5 for Java5.

The environment can be configured in a number of locations, depending on need:

  • /etc/profile, /etc/csh.login
  • $HOME/.profile, $HOME/.cshrc and $HOME/.kshrc
  • Start-up scripts

However, we do not recommend you add it to the /etc/environment file.


Troubleshooting

  1. The most common reasons for an unsuccessful download, installation, upgrade, or configuration are:
    • Incomplete downloaded files
    • Not setting up environment variables properly
    • Setting the ulimit command in user profiles
    • Permissions
    • Not enough available space in the volume group
    • Moving or renaming JDK or SDK files after installation

    If you're still unable to install, upgrade, or configure Java after verifying and correcting the above items, collect the following information before contacting IBM Java support:

    • Uploading the ${HOME}/smit.log after having used the SMIT utility to unsuccessfully install or upgrade Java.
    • For a failed installation, run each of the following commands for each file downloaded from the download page and send the output to the technical support person.
      ls -l file_name
      
      sum file_name
  2. If you have successfully installed Java but are unable to run an application or list the version, run the following commands and send the output file install.log to the technical support person.

    In the following example, replace <java_home> with the Java installation directory:

    script install.log
    id
    
    find /usr/<java_home> -ls
    
    env
    
    which java
    
    /usr/<java_home>/jre/bin/java -fullversion
    
    /usr/<java_home>/jre/bin/java -version
    
    lslpp –lc
    
    lppchk –c < Fileset>
    
    ulimit -a
    exit
  3. Missing requisite software

    Output from the installp command will be provided on the screen and appended to the end of $HOME/smit.log. Review the output to determine what the missing requisite software is and make corrections if necessary. Use the lslpp command to review the software that has been installed on the system. For missing software, you may have to install the base level of the fileset from your AIX installation media, then apply any updates to get to the required level.

    In most cases, the missing requisites are:

    • X11.adt
    • OpenGL.*
    • devices.*

    When trying to locate the base fileset from the AIX installation media (not upgrade media), it's best to insert the CD into the CD drive (do not mount the CD). Then start the SMIT utility to install the software. For the installation directory, enter the device (for example, /dev/cd0 ) for the CD drive, then continue. On the install page, select F4 to view and F7 to select the desired filesets. During the installation, the system will prompt you for the correct CD containing the selected filesets.

    In most cases, a reboot of the system will not be required. However, if you were required to install requisite software, you need to review the output when it was installed to see if a reboot is required. If you've already exited from the SMIT utility, you can look in the file $HOME/smit.log, which contains the output generated while running SMIT.

  4. Corrupted or missing files
    • Verify that the file sizes are correct.
    • Verify that the inutoc command was executed prior to running SMIT.
    • Verify that the files were unpackaged after downloading.
  5. Not enough space

    Java files are installed under the /usr directory. Ensure that this file system and the volume group (for example, rootvg) has adequate space available.

  6. Base filesets not installed

    When applying an upgrade, you need the base level of the filesets installed first. Identify which filesets are required, install them, and then continue with the upgrade.

  7. Symbolic links missing

    You need to be careful if you try to install a copy of the JDK or SDK from a backup into a directory different from the default location. There are symbolic links specific to the default path, so after copying the files to a new location, you need to make sure to reset any symbolic links. As with the JRE, copying the JDK or SDK to a different location is not supported. The only supported configuration is one where the JDK or SDK is located in the default directory listed on the primary download page.

Resources

Learn

Get products and technologies

  • Download and service Information provides currently available Java versions for AIX, most recent release notes, list of defects, updates available, supported AIX versions, location of Java files after installation, end of support or service dates, and guidelines for getting support for Java on AIX.
  • Go to Fix Central to download files associated with specific APARs.

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into AIX and Unix on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=AIX and UNIX
ArticleID=87786
ArticleTitle=Implementing Java on AIX: Download, installation, and configuration
publish-date=04012008