Install Oracle Java 7u79/80 on Fedora 24/23, CentOS/RHEL 7.2/6.8/5.11 - Comment Page: 3

Please note: This guide still working normally if you want install Sun/Oracle Java 7, but if you want Java 8 version, then check Install Oracle Java JDK/JRE 8 on Fedora, CentOS/RHEL. This is guide, howto Install Sun/Oracle Java JDK and JRE 7 CPU (7u79) and PSU (7u80) on Fedora 24/23/22/21/20/19/18/17/16/15/14/13/12, CentOS 7.2/6.8/5.11, Red Hat (RHEL) 7.2/6.8/5.11. Read more, what is difference between CPU and PSU release. If you're looking instruction for Sun/Oracle Java JDK/JRE version 6 installation on Fedora 20/19/18, CentOS/Red Hat (RHEL) 6.5/5.10, please check this guide. [inttf_post_ad1] What's new in Sun/Oracle Java 7 VM Compressed 64-bit object...

267 comments on “Install Oracle Java 7u79/80 on Fedora 24/23, CentOS/RHEL 7.2/6.8/5.11 - Comment Page: 3

1 2 3 4 5 10
    1. hi,
      i have openjdk 1.6.0 and jdk 7. i need jdk 6 on my box, do you know how to do remove jdk 7 from my fedora 16 box? thanks.

      • Hi reza,

        So you want to install Oracle Java JDK 6 also? But I don’t understand why you want remove Oracle Java JDK 7? :)

    2. Oh yeah it’s very simple to install java on Linux !!!

      • Hi under2sea,

        I agree, very simple setup… :)

    3. Thanks! Great post & nice site for red eyed linux users.

    4. […] again. I found this very useful when I set up my java, complete with an alternatives chooser:…-red-hat-rhel/ — for both 32 and 64 systems but he dot I found out about on a forum. All the same my java works […]

    5. when i try to type


      the output is no such file or directory.

      what should i do? all else is successful except this one.

      • Hi Joan a,

        Did you installed JAVA JRE or JDK and 32-bit or 64-bit?

    6. How do we fix symbolic links?

      For example, i got
      the primary link for must be /usr/lib/mozilla/plugins/

      • Hi Newtype,

        Could you post exact command and full error message what you try to run?

        And please post also output of following commands:

        uname -a
        lsb_release -a
        • Thanks Jr, the command was
          alternatives --install /usr/lib64/mozilla/plugins/ \ /usr/java/latest/lib/amd64/ 20000

          If I remove the “/”
          alternatives --install /usr/lib64/mozilla/plugins/ /usr/java/latest/lib/amd64/ 20000
          The will appear as an broken symbolic link and the target it was trying to link becomes “/etc/alternatives/”
          which was trying to link
          which is wrong, as the file it was trying to locate is in fact
          However, even if the original “/etc/alternatives/” is deleted. The new “/etc/alternatives/” created by the command
          alternatives --install /usr/lib64/mozilla/plugins/ /usr/java/latest/lib/amd64/ 20000
          Will still attempt to link to “”/usr/java/latest/jre/amd64/”

          Well, what I did now is do a cp -a lib jre, but I am not sure is this what we are suppose to do.

          • uname -a gives
            Linux 3.2.3-2.fc16.x86_64 #1 SMP Fri Feb 3 20:08:08 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
            lsb_release-a gives

            LSB Version: :core-4.0-amd64:core-4.0-noarch
            Distributor ID: Fedora
            Description: Fedora release 16 (Verne)
            Release: 16
            Codename: Verne

            I am using the 64 bit version.

            • Okay, this looks very messy. The first thing to do is forget all the cp -a jre lib style commands, because they are not really needed! With these you only get a problems.

              So are you installing Oracle Java JRE or JDK?

              Could you please post output of following commands:

              ls -la /usr/lib64/mozilla/plugins/
              ls -la /etc/alternatives/
              ls -la /usr/java/
              ls -la /usr/java/latest/lib/amd64/
              ls -la /usr/java/latest/jre/lib/amd64/
    7. The copy -a command is just a compromised solution I can think of to fix the broken symbolic link. Mozilla do recognise the plugin afterwards and passed the java test, but I guess it only worked because java doesnt care about it.
      I only have JRE installed, since I dont really need the stuff in JDK.
      And for list command, here is what I got
      ls -la /usr/lib64/mozilla/plugins/
      /usr/lib64/mozilla/plugins/ -> /etc/alternatives/
      ls -la /etc/alternatives/
      /etc/alternatives/ -> /usr/java/latest/jre/amd64/
      Obviously, something screwed up here.

      ls -la /usr/java
      total 40572
      drwxr-xr-x. 3 root root 4096 Feb 7 18:45 .
      drwxr-xr-x. 14 root root 4096 Nov 10 19:55 ..
      lrwxrwxrwx. 1 root root 16 Nov 22 20:48 default -> /usr/java/latest
      drwxr-xr-x. 8 root root 4096 Feb 8 17:29 jre1.6.0_30
      -rw-r--r--. 1 root root 20904187 Oct 3 19:00 jre-6u29-linux-amd64.rpm
      -rwxr-xr-x. 1 root root 20627096 Nov 21 18:11 jre-6u29-linux-x64-rpm.bin
      lrwxrwxrwx. 1 root root 21 Feb 7 18:07 latest -> /usr/java/jre1.6.0_30

      ls -la /usr/java/latest/lib/amd64/
      -rwxr-xr-x. 1 root root 80592 Nov 10 17:49 /usr/java/latest/lib/amd64/
      ls -la /usr/java/latest/jre/lib/amd64/
      ls: cannot access /usr/java/latest/jre/lib/amd64/ No such file or directory
      ls -la /usr/java/latest/jre/amd64/
      -rwxr-xr-x. 1 root root 80592 Nov 10 17:49 /usr/java/latest/jre/amd64/

      • Your problem is that the you have installed Java JRE 6, with Java JRE 7 guide…with Java JRE 6 64-bit right alternatives install command is:

        alternatives --install /usr/lib64/mozilla/plugins/ /usr/java/jre1.6.0_30/lib/amd64/ 20000
        ## OR ##
        alternatives --install /usr/lib64/mozilla/plugins/ /usr/java/latest/lib/amd64/ 20000

        More info from Java 6 install guide.

        • I am afraid that the problem may not be caused by an incorrect command, because the command in question is exactly the same, word by word.
          I am using the “latest” method and from what I have gathered, the installation steps for Java 1.6 and 1.7 is exactly the same as well.

          Besides, for both 1.6 and 1.7 installation, the command

          alternatives --install /usr/lib64/mozilla/plugins/ /usr/java/latest/lib/amd64/ 20000

          will generate the corrupted symbolic link in

          In fact, I have done a bit research in regarding to this problem.
          The corrupt link can be linked to anywhere. For another instance, the link was incorrectly pointed to “/usr/lin64/mozilla/plugins/” and in my case, it was “/usr/java/latest/jre/amd64/”.

          The cause of the problem is really caused by a typo when the symbolic link was first made. Unfortunately, after the link is made, it cannot be changed, even if the .so file is deleted and recreated; or perhaps this only occurs in fedora.

          The only way to “fix” it, is sadly, changing the java path.

          • Of course you could change/remove link with alternatives –remove command, like:

            alternatives --remove /usr/java/latest/lib/amd64/

            If you remove original .so file then you have broken link(s) yes. So you can fix it simply, first remove wrong link and then create right link. One thing to remember, you should never touch (manually with mv, cp, rm, etc. commands) any files which are installed from RPM packages. Or you have soon a Linux system that can’t longer maintain and update.

    8. […] you want to install JRE on CentOS, follow the steps in this link. I have used this in the past and have found it handy. You might also try icedtea plugin from the […]

    9. Steps provided was just what was needed for RHEL newbie learning Linux in more detail. Thanks much and keep up the great work!

    10. jdk7 installation is removing jdk6, how do i keep both?

    11. Thanks for the instructions. Worked like a charm!!!

    12. Thanks for this tutorial, I’m new user in Linux and finally found one that worked. :)

    13. Thank You so much it just worked perfectly

    14. Perfect!
      Great tutorial.


1 2 3 4 5 10

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.