Did You Know?
Got a tip? Let us know

HostGator Diwali Mega Offer 50% Flat Discount on all Hosting Plans - Grab it Now

Install JDK/JRE 7u25 on RHEL/CentOS 6/5 and Fedora 18-12

Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators

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 7u25 on RHEL 6.4/6.3/6.2/6.1/6/5.8, CentOS 6.4/6.3/6.2/6.1/6/5.8 and Fedora 18/17,16,15,14,13,12 systems using binary RPM files.

Install Java in Linux

Install Java 7u25 in Linux

Downloading Java JDK / JRE 6 Binary

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

For RHEL/CentOS/Fedora 32-bit OS
For RHEL/CentOS/Fedora 64-bit OS

Install Java JDK / JRE 7u25

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

## Install Java on 32-Bit OS ##
# rpm -Uvh jdk-7u25-linux-i586.rpm
# rpm -Uvh jre-7u25-linux-i586.rpm 

## Install Java on 64-Bit OS ##
# rpm -Uvh jdk-7u25-linux-x64.rpm
# rpm -Uvh jre-7u25-linux-x64.rpm

Check Java JDK / JRE 7u25

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

[root@tecmint ~]# java -version

java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b04)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)
[root@tecmint ~]# javac -version

javac 1.7.0_25

Enable Java JDK /  JRE 7u25 Support in Firefox

To enable JDK /JRE 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.7.0_25/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.7.0_25/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

Ravi Saive

Owner at TecMint.com
Simple Word a Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux.

Linux Services & Free WordPress Setup

Our post is simply ‘DIY’ aka ‘Do It Yourself, still you may find difficulties and want us to help you out. We offer wide range of Linux and Web Hosting Solutions at fair minimum rates. Please submit your orders by Clicking Here.

14 Responses

  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

  2. Marselino says:

    Thank you!

  3. sadakar says:

    Hi.. I’m very newbi to putty. Even I do not know the usage of linux machine.
    Now I want to learn
    How to install jdk in CentOS release 5.9 (Final) using putty ?
    Could plz. provide step by step procedure ?


  4. rishi says: is apche2 is running but not runny ..unable to connect :(

  5. rishi says:

    apche tomcat bootstartup error when i service tomcat stop

  6. m says:

    I did everything but it did not work…

    Then tried telnet localhost 8080

    [m@localhost ~]$ telnet localhost 8080
    telnet: connect to address Connection refused
    [m@localhost ~]$

  7. HM says:

    Is there something wrong with the Fedora package?

    After installing the package with rpm -Uvh jdk-7u25-linux-x64.rpm the following command would not list it:

    alternatives –config java

    Only shows one and that’s openjdk

    java -version gives me open jdk.

    Installing the package again (no errors or warnings the first time) tells me it already installed.

    I’ll try a reboot and see if that helps,.

  8. Andrew says:

    How to install if I’m not a root user? `rpm -Uvh` requires me to be root.


  9. How do I save and exit out of the repo once i have entered the content in?

  10. srini says:

    Hi ravi,

    i have installed centos 6.4 in desktop mode successfully in m y machine. can able to act as a SVN Server in that machine.

  11. charles igbo says:

    Do you have a documentation on how to install JavaFX on centos.

Leave a Reply

This work is licensed under a (cc) BY-NC | TecMint uses cookies. By using our services, you comply to use of our cookies. More info: Privacy Policy.
© 2012-2014 All Rights Reserved.