This is a comprehensive guide on how to download, setup, install Java Runtime Environment(JRE) and set java environment variable on IBM AIX 7.1 operating system.
Find CPU type
Check whether you need 64bit or 32 bit java version
Run following command and check CPU Type.
prtconf
Download JRE
JRE is part of SDK in AIX. You will not be able to download separate package of JRE for AIX.
Download link:
https://www.ibm.com/developerworks/java/jdk/aix/service.html
Unpack JRE Tar file
tar –xvf Java8_64.jre.tar
You will get Java8_64.jre file which is backup/restore format
Install JRE
Run following commands
inutoc . smitty installp
You need super user rights to run inutoc . command. Login as su or use sudo –i
Press Install software
Enter ./home/<username>/
This is location refers to which location you have extracted your file to install.
Select ACCEPT new license agreement? Press tab to change the parameter
Press F10 to exit
$
Confirm Java installation
lslpp -l | grep -i java
Set JAVA_HOME environment variable
If you are using bash, ash, ksh or some other Bourne-style shell
Open .profile file, add JAVA_HOME line and add java path. The .profile file looks like below after changes.
JAVA_HOME=/usr/java8_64/jre;export JAVA_HOME PATH=/usr/java8_64/jre/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin. export PATH if [ -s "$MAIL" ] # This is at Shell startup. In normal then echo "$MAILMSG" # operation, the Shell checks fi # periodically.
Restart putty session
Verify Java version and JAVA_HOME variable
JAVA_HOME
$ echo $JAVA_HOME /usr/java8_64/jre
Java Version
$ java -version java version "1.8.0" Java(TM) SE Runtime Environment (build pap6480sr1fp10ifix-20150723_01(SR1 FP10+IV75420)) IBM J9 VM (build 2.8, JRE 1.8.0 AIX ppc64-64 Compressed References 20150722_258693 (JIT enabled, AOT enabled) J9VM - R28_jvm.28_20150722_1718_B258693 JIT - tr.r14.java_20150625_95081.02 GC - R28_jvm.28_20150722_1718_B258693_CMPRSS J9CL - 20150722_258693) JCL - 20150711_01 based on Oracle jdk8u51-b15