Wednesday, September 25, 2013

Installing 32 bit java on my 64 bit CentOs6 machine

This is a right old pain to do, so unless you really need to, I would say find a way to stick to the native 64 bit jre/jdk install.
As of this writing, the latest jdk version available is 1.7.0_40

A quick listing of the steps I followed are below. The commands are italicised.

1. yum erase jdk (to remove the existing 64 bit java devel environment)

2. Download the x86 version of jdk (the rpm), say jdk-7u40-linux-i586.rpm

3. yum provides  libgcc_s.so.1
    yum install libgcc-4.4.7-3.el6.i686 
(which is what came up as the reqd package from the command above)

4. yum install jdk-7u40-linux-i586.rpm

5. Check your installation with the usual 
    java -version

In case you want both the 64 and 32 bit versions of java installed, you'll have to muck about with alternatives, which I happily chose to avoid!