IBMJava

Availability of IBM Java from the Canonical Partner archive.

First of all the Partner archive needs to be enabled first:

Before doing that you may want to backup your sources.list file:

ubuntu@ppc64el:~$ ls -lad /etc/apt/sources.list*  -rw-r--r-- 1 root root 3353 Mar 24 06:36 /etc/apt/sources.list  drwxr-xr-x 2 root root 4096 Mar 24 06:35 /etc/apt/sources.list.d  ubuntu@ppc64el:~$ sudo cp /etc/apt/sources.list /etc/apt/sources.list_`date +%Y%m%d`.backup  ubuntu@ppc64el:~$ ls -lad /etc/apt/sources.list*-rw-r--r-- 1 root root 3383 Mar 24 06:36 /etc/apt/sources.list  -rw-r--r-- 1 root root 3353 Apr  6 09:55 /etc/apt/sources.list_20170508.backup  drwxr-xr-x 2 root root 4096 Mar 24 06:35 /etc/apt/sources.list.d 

Now edit your /etc/apt/sources.list manually or just execute:

ubuntu@ppc64el:~$ sudo add-apt-repository "deb http://archive.canonical.com/ubuntu $(lsb_release -sc) partner" 

You should no have some entries like this in your sources.list file:

ubuntu@ppc64el:~$ grep ^deb.*partner /etc/apt/sources.list  deb http://archive.canonical.com/ubuntu xenial partner 

If so just update the archive indices with:

ubuntu@ppc64el:~$ sudo apt update -qq 

You should now be able to find the packages with:

ubuntu@ppc64el:~$ apt list | grep ^ibm    WARNING: apt does not have a stable CLI interface. Use with caution in scripts.    ibm-java80-jdk/xenial 8.0.4.1-0ubuntu1 ppc64el  ibm-java80-jre/xenial 8.0.4.1-0ubuntu1 ppc64el 

Or just have a direct look in the package archive files:

ubuntu@ppc64el:~$ grep Package /var/lib/apt/lists/archive.canonical.com_ubuntu_dists_$(lsb_release -sc)_partner_binary-ppc64el_Packages | grep ibm-java  Package: ibm-java80-jdk  Package: ibm-java80-jre 

Get more details about the installation candidates with:

ubuntu@ppc64el:~$ apt-cache policy ibm-java80-jdk ibm-java80-jre  ibm-java80-jdk:    Installed: (none)    Candidate: 8.0.4.1-0ubuntu1    Version table:       8.0.4.1-0ubuntu1 500          500 http://archive.canonical.com/ubuntu xenial/partner ppc64el Packages  ibm-java80-jre:    Installed: (none)    Candidate: 8.0.4.1-0ubuntu1    Version table:       8.0.4.1-0ubuntu1 500          500 http://archive.canonical.com/ubuntu xenial/partner ppc64el Packages 

Okay, let's now do the install - of the JRE and the JDK - you have to accept the license in between (you can use and install the two packages for sure also separately):

ubuntu@ppc64el:~$ sudo apt install ibm-java80-jdk ibm-java80-jre  Reading package lists... Done  Building dependency tree       Reading state information... Done  The following NEW packages will be installed:    ibm-java80-jdk ibm-java80-jre  0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.  Need to get 121 MB of archives.  After this operation, 223 MB of additional disk space will be used.  Get:1 http://archive.canonical.com/ubuntu xenial/partner ppc64el ibm-java80-jre ppc64el 8.0.4.1-0ubuntu1 [92.6 MB]  Get:2 http://archive.canonical.com/ubuntu xenial/partner ppc64el ibm-java80-jdk ppc64el 8.0.4.1-0ubuntu1 [28.2 MB]  Fetched 121 MB in 3s (36.3 MB/s)          Preconfiguring packages ...  Selecting previously unselected package ibm-java80-jre:ppc64el.  (Reading database ... 102238 files and directories currently installed.)  Preparing to unpack .../ibm-java80-jre_8.0.4.1-0ubuntu1_ppc64el.deb ...  Unpacking ibm-java80-jre:ppc64el (8.0.4.1-0ubuntu1) ...  Selecting previously unselected package ibm-java80-jdk:ppc64el. 

Package configuration

 ┌──────────────────────┤ Configuring ibm-java80-jre ├───────────────────────┐  │                                                                           │  │ LICENSE INFORMATION                                                          │                                                                              │                                                                              │                                                                              │ The Programs listed below are licensed under the following License           │ Information terms and conditions in addition to the Program license          │ terms previously agreed to by Client and IBM. If Client does not have        │ previously agreed to license terms in effect for the Program, the IBM        │ International License Agreement for Non-Warranted Programs                   │ (Z125-5589-05) applies.                                                      │                                                                              │ Program Name: IBM(R) SDK, Java(TM) Technology Edition, Version 8 Program     │ Number: 6213-001                                                             │                                                                              │                                  <Ok>                                        │                                                                           │  └───────────────────────────────────────────────────────────────────────────┘

Package configuration

  ┌─────────────────────┤ Configuring ibm-java80-jre ├──────────────────────┐   │                                                                         │   │ In order to install this package, you must accept the license terms .   │   │ Not accepting will cancel the installation.                             │   │                                                                         │   │ Do you accept the terms of the License Agreement ?                      │   │                                                                         │   │                    <Yes>                       <No>                     │   │                                                                         │   └─────────────────────────────────────────────────────────────────────────┘

Preparing to unpack .../ibm-java80-jdk_8.0.4.1-0ubuntu1_ppc64el.deb ...   license has already been accepted  Unpacking ibm-java80-jdk:ppc64el (8.0.4.1-0ubuntu1) ...  Processing triggers for mime-support (3.59ubuntu1) ...  Setting up ibm-java80-jre:ppc64el (8.0.4.1-0ubuntu1) ...  Setting up ibm-java80-jdk:ppc64el (8.0.4.1-0ubuntu1) ... 

Now let's have a look which version we just installed:

ubuntu@ppc64el:~$ dpkg -l | grep ibm-java  ii  ibm-java80-jdk:ppc64el               8.0.4.1-0ubuntu1                 ppc64el        IBM Java(TM) Development Kit (JDK) 8.0  ii  ibm-java80-jre:ppc64el               8.0.4.1-0ubuntu1                 ppc64el        IBM Java(TM) Runtime Environment (JRE) 8.0 

or in case you prefer the apt way:

ubuntu@ppc64el:~$ apt list | grep ^ibm    WARNING: apt does not have a stable CLI interface. Use with caution in scripts.    ibm-java80-jdk/xenial,now 8.0.4.1-0ubuntu1 ppc64el [installed]  ibm-java80-jre/xenial,now 8.0.4.1-0ubuntu1 ppc64el [installed] 

or using again apt-cache policy:

ubuntu@ppc64el:~$ apt-cache policy ibm-java80-jdk ibm-java80-jreibm-java80-jdk:    Installed: 8.0.4.1-0ubuntu1    Candidate: 8.0.4.1-0ubuntu1    Version table:   *** 8.0.4.1-0ubuntu1 500          500 http://archive.canonical.com/ubuntu xenial/partner ppc64el Packages          100 /var/lib/dpkg/status  ibm-java80-jre:    Installed: 8.0.4.1-0ubuntu1    Candidate: 8.0.4.1-0ubuntu1    Version table:   *** 8.0.4.1-0ubuntu1 500          500 http://archive.canonical.com/ubuntu xenial/partner ppc64el Packages          100 /var/lib/dpkg/status 

The IBM Java JRE reports itself as:

ubuntu@ppc64el:~$ java -version  java version "1.8.0"  Java(TM) SE Runtime Environment (build pxz6480sr4fp1-20170215_01(SR4 FP1))  IBM J9 VM (build 2.8, JRE 1.8.0 Linux ppc64el-64 Compressed References 20170209_336038 (JIT enabled, AOT enabled)  J9VM - R28_20170209_0201_B336038  JIT  - tr.r14.java.green_20170125_131456  GC   - R28_20170209_0201_B336038_CMPRSS  J9CL - 20170209_336038)  JCL - 20170215_01 based on Oracle jdk8u121-b13 

And the IBM Java JDK / Java compiler is:

ubuntu@ppc64el:~$ javac -version  javac 1.8.0  ubuntu@ppc64el:~$ 

Finally let's do a quick verification and let's close we the almost mandatory HelloWorld example:

ubuntu@ppc64el:~$ vi HelloWorld.java  ubuntu@ppc64el:~$ cat HelloWorld.java  public class HelloWorld {        public static void main(String[] args) {          System.out.println("Hello "+System.getProperty("os.arch")+" World!");      }   }  ubuntu@ppc64el:~$ javac HelloWorld.java  ubuntu@ppc64el:~$ java HelloWorld  Hello ppc64el World!  ubuntu@ppc64el:~$ 

ppc64el/IBMJava (last edited 2017-05-24 06:18:54 by fheimes)