TecMint.com is a community driven Linux website. Our motto is to provide an effortless howto’s to our valuable readers.

You are also welcome to join our community and can be part of our team, contributing and submitting well written article on Linux. If you have any query, please contact us by email tecmint.com [at] gmail [dot] com or use our contact form.

Install JDK /JRE 6 on RHEL/CentOS 6/5 and Fedora 17-12

Most of the Linux operating systems comes with pre-installed OpenJDK package to run java-based applications and plugins. Now, you’re thinking if Java already ships with OS, why we need to install it again?. Yes! right good question, but in certain cases we need Sun/Oracle Java program to compile and run particular development applications. This is the reason we are compiling this article on how to install Sun/Oracle Java JDK /JRE 6 on RHEL 6.3/6.2/6.1/6/5.8, CentOS 6.3/6.2/6.1/6/5.8 and Fedora 17,16,15,14,13,12 systems using binary RPM files.

Install Sun/Oracle Java 6 in Linux

Install Sun/Oracle Java 6 in Linux

Downloading Java JDK / JRE 6 Binary

Download Java JDK /JRE 6 binary files for your system OS bit. For reference, we have provided the binary file-names, please select these below mentioned files only.

For RHEL/CentOS/Fedora 32-bit OS
jdk-6u34-linux-i586-rpm.bin
jre-6u34-linux-i586-rpm.bin
For RHEL/CentOS/Fedora 64-bit OS
jdk-6u34-linux-x64-rpm.bin
jre-6u34-linux-x64-rpm.bin

Setting Execute Permission on Java JDK / JRE 6

To run the program, we need to set the execute permission on both downloaded binary files.

## Execute commands on 32-Bit OS ##
# chmod +x jdk-6u34-linux-i586-rpm.bin
# chmod +x jre-6u34-linux-i586-rpm.bin

## Execute commands on 64-Bit OS ##
# chmod +x jdk-6u34-linux-x64-rpm.bin
# chmod +x jre-6u34-linux-x64-rpm.bin

Install Java JDK / JRE 6

Now, execute the binary files to install JDK /JRE programs on systems.

## Install Java on 32-Bit OS ##
# ./jdk-6u34-linux-i586.rpm.bin
# ./jre-6u34-linux-i586-rpm.bin

## Install Java on 64-Bit OS ##
# ./jdk-6u34-linux-x64-rpm.bin
# ./jre-6u34-linux-x64-rpm.bin

Check Java JDK / JRE 6

Verify by running the following command, you will get similar results as below.

[root@tecmint ~]# java -version

java version "1.6.0_34" Java(TM) SE Runtime Environment (build 1.6.0_34-b04) Java HotSpot(TM) Client VM (build 20.9-b04, mixed mode, sharing)
[root@tecmint ~]# javac -version

javac 1.6.0_34

Enable Java JDK /  JRE 6 Support in Firefox

To enable JDK /JRE 6 support in Firefox we need to run the following commands to enable it. If you don’t have Firefox installed and like to install it, then check How to Install Firefox 14 guide.

## For 32-Bit OS ##
# alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /usr/java/jdk1.6.0_34/jre/lib/i386/libnpjp2.so 20000

## For 64-Bit OS ##
# alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/jdk1.6.0_34/jre/lib/amd64/libnpjp2.so 20000

Verify it, by restarting Firefox and enter about:plugins on the address bar. You will get similar to below screen.

Java support in Firefox
Java Support in Firefox

Java Support in Firefox


One Response

  1. I did everything to get Firefox to recognize the plugin and this doc finally helped. I didn’t know that I had to do alternates in the actual plugin directory.

    Thank You
    Clint

Leave a Reply

Proudly designed by Tecmint.com.