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

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: 6

1 4 5 6 7 8 10
      • Hi Tiago and thanks!

        You can also install it using yum:

        
        yum install libX11
        
        Reply
        • I needed to install xterm to resolve an applet error.
          sudo yum install xterm.x86_64

          Reply
    1. Thanks a lot for this very useful instructions!

      Best regards.

      Aníbal

      Reply
    2. I just tried to install JDK 7-17 on Fedora 18 and got the following error on Step 3. Your assistance would be appreciated:

      [[email protected] ~]# rpm -Uvh /var/tmp/jdk-7u17-linux-x64.rpm
      Preparing… ################################# [100%]
      Updating / installing…
      1:jdk-2000:1.7.0_17-fcs ################################# [100%]
      Unpacking JAR files…
      rt.jar…
      Error: Could not open input file: /usr/java/jdk1.7.0_17/jre/lib/rt.pack
      jsse.jar…
      Error: Could not open input file: /usr/java/jdk1.7.0_17/jre/lib/jsse.pack
      charsets.jar…
      Error: Could not open input file: /usr/java/jdk1.7.0_17/jre/lib/charsets.pack
      tools.jar…
      Error: Could not open input file: /usr/java/jdk1.7.0_17/lib/tools.pack
      localedata.jar…
      Error: Could not open input file: /usr/java/jdk1.7.0_17/jre/lib/ext/localedata.pack

      Reply
      • Hi getcar,

        You can ignore those .pack file errors, all jar packages are unpacked successfully (without errors). .pack files are used by Java Web Start clients to retrieve and unpack JAR files for Java programs. So these errors doesn’t affect the JRE / JDK functionality when you install it using RPM package.

        Reply
    3. I want to say first I am running Centos 6.4 in a virtuabox. I don’t think that should be an issue,

      I removed open java yum remove java
      then I downloaded the latest oracle java
      I installed rpm -ivh jdk-7u17-linux-x64.rpm
      then I alternatives –install /usr/bin/java java /usr/java/latest/jre/bin/java 20000
      then rnatives –install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.s
      then I linked the plugin to ~/.mozilla/plugins

      Now whenever I hit a java site firefox crashes. It goes down fast too. I don’t even know what to check

      If I look at about:plugins I see the java plugins
      java -version
      java version “1.7.0_17”
      Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
      Java Hotspot(TM) 64-Bit Server VM (Build 23.7-b01, mixed mode)

      any ideas on why firefox is crashing now would be appreciated.

      Thanks again,
      Mike

      Reply
      • Hi Mike,

        It’s not needed to link ~/.mozilla/plugins, if you run following command (Java JRE installation):

        
        alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/latest/jre/lib/amd64/libnpjp2.so 20000
        

        So remove link from ~/.mozilla/plugins and check output of following command:

        
        ls -la /usr/lib64/mozilla/plugins/libjavaplugin.so
        
        Reply
        • @pmkehdvs1001:~/.mozilla/plugins$ ls -la /usr/lib64/mozilla/plugins/libjavaplugin.so
          lrwxrwxrwx. 1 root root 41 Mar 16 22:45 /usr/lib64/mozilla/plugins/libjavaplugin.so -> /etc/alternatives/libjavaplugin.so.x86_64

          Ok done, but firefox still crashes on java pages. If I open firefox and type in javatest in the search bar it hangs for a second then disappears. If I type in cars it will work find and go to wesites with cars in them.

          Reply
          • Hi Mike,

            Could you post also output of following commands:

            
            ls -la ~/.mozilla/plugins
            
            alternatives --display libjavaplugin.so.x86_64
            
            Reply
    4. Hi JR, Well after hours of playing with it, I remembered that I was building this in a virtualbox. I decided to just start over, and what ever I did wrong or whatever went wrong went right with the second VM. Thank you for your help. I am all good now.

      Thanks again,
      Mike

      Reply
      • Hi Mike,

        You are welcome! Nice to hear that you got it working!

        Reply
    5. Thanks very much for the post!

      Reply
    6. Hi,
      Thanks for the nice guide. I tried to follow your instructions but I run across problems. I’ll be thankful if you can help me out.

      When I run
      $ rpm -Uvh ../jdk-7u21-linux-i586.rpm
      the output was:
      Preparing… ########################################### [100%]
      1:jdk ########################################### [100%]
      error: unpacking of archive failed on file /usr/java/jdk1.7.0_21/db/lib/derby.jar;517bea0a: cpio: Digest mismatch

      I tried to ignore it, but when I run
      alternatives –install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /usr/java/latest/lib/i386/libnpjp2.so 20000
      the output was:
      failed to read link /usr/lib/mozilla/plugins/libjavaplugin.so: No such file or directory

      What is the problem here?
      Thanks,

      Reply
    7. Hello, it is a great post! Thank you – it has helped me a lot

      I think this should be published in the Centos Wiki. They have very outdated java install descriptions that include using JPackage and nosrc files, and -most importantly- do not work for some of the packages as the spec file has a call to a wrong folders. I spent enough time struggling with that before I came across your post, which offers a much better way of installing Java on Centos 6. I wouldn’t mind adding it to the Wiki, but I wouldn’t like to copy it without your previous permission. Please let me know if this would be all right. Or maybe you would like to add it?

      Reply
      • Hi OlgaMaria,

        Nice to hear that this post was useful to you!

        You can add this to CentOS Wiki, if you want to (link back, would be nice, but not necessary). Just checked CentOS Wiki page and yes, it looks like very messy. Btw. Java updating is also very easy process with this style (if you use latest method), then just download latest rpm (from Oracle site) and install it and you are ready.

        Reply
    8. Thank you very much…java -version works fine but Java Applets give error with SELinux error! What to do to make java applets work?

      Reply
    9. Thanks a lot for this article.

      Reply
    10. Good Day,

      I have finally updated java 7u40 from java 7u17, however I am unable to get java to work with firefox. I am running CentOS 6.4 and I have been using Java 7u4 without any failures following the above mention guide.

      $ java -version
      java version “1.7.0_40”
      Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
      Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)

      I have tried both x86 and x86_64 for libjavaplugin.so on my laptop which is x86_64. I have tried x86_64 nstallation instructions, however firefox does not see java installed.

      $ alternatives –display libjavaplugin.so
      libjavaplugin.so – status is auto.
      link currently points to /usr/java/jre1.7.0_40/lib/i386/libnpjp2.so
      /usr/java/jre1.7.0_40/lib/i386/libnpjp2.so – priority 20000
      /usr/java/latest/lib/i386/libnpjp2.so – priority 20000
      Current `best’ version is /usr/java/jre1.7.0_40/lib/i386/libnpjp2.so.

      $ alternatives –display libjavaplugin.so.x86_64
      libjavaplugin.so.x86_64 – status is manual.
      link currently points to /usr/java/latest/jre/lib/amd64/libnpjp2.so
      /usr/java/latest/lib/amd64/libnpjp2.so – priority 20000
      /usr/java/latest/jre/lib/amd64/libnpjp2.so – priority 20000
      /usr/java/jre1.7.0_17/lib/amd64/libnpjp2.so – priority 20000
      /usr/java/jdk1.7.0_40/jre/lib/amd64/libnpjp2.so – priority 20000
      /usr/java/jre1.7.0_40/lib/amd64/libnpjp2.so – priority 20000
      Current `best’ version is /usr/java/latest/lib/amd64/libnpjp2.so.

      Any tips are highly appreciated

      Reply
      • Hi Earl Ramirez,

        I just updated this guide to latest Java 7u40 version and tested this also with Firefox 24 and it’s working normally.

        Could you first post output of following commands:

        
        uname -a
        
        rpm -qa jre\* jdk\* firefox
        
        ls -la /usr/java/latest/jre/lib/amd64/libnpjp2.so
        
        ls -la /usr/java/jre1.7.0_40/lib/i386/libnpjp2.so
        
        ls -la /usr/java/jre1.7.0_40/lib/amd64/libnpjp2.so
        
        ls -la /usr/java/jdk1.7.0_40/jre/lib/amd64/libnpjp2.so
        
        Reply
    11. Hello JR,

      Thanks for your response and for updating the guide. Below is the of the following commands:

      $ uname -a
      Linux user.somedomaine.com 2.6.32-358.18.1.el6.x86_64 #1 SMP Wed Aug 28 17:19:38 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

      $ rpm -qa jre\* jdk\* firefox
      jre-1.7.0_40-fcs.x86_64
      firefox-17.0.9-1.el6.centos.x86_64

      $ ls -la /usr/java/latest/jre/lib/amd64/libnpjp2.so
      ls: cannot access /usr/java/latest/jre/lib/amd64/libnpjp2.so: No such file or directory

      $ ls -la /usr/java/jre1.7.0_40/lib/i386/libnpjp2.so
      ls: cannot access /usr/java/jre1.7.0_40/lib/i386/libnpjp2.so: No such file or directory

      $ ls -la /usr/java/jre1.7.0_40/lib/amd64/libnpjp2.so
      -rwxr-xr-x. 1 root root 205080 Aug 27 03:18 /usr/java/jre1.7.0_40/lib/amd64/libnpjp2.so

      $ ls -la /usr/java/jdk1.7.0_40/jre/lib/amd64/libnpjp2.so
      ls: cannot access /usr/java/jdk1.7.0_40/jre/lib/amd64/libnpjp2.so: No such file or directory

      Thanks in advance for your response

      Reply
    12. Hello JR,

      I saw that I did not install the jdk package, after installing the package and following the guide. I’m now able to see java plugin within Firefox.

      Please see output from about:plugins from Firefox

      Java(TM) Plug-in 10.40.2

      File: libnpjp2.so
      Version: 10.40.2
      Next Generation Java Plug-in 10.40.2 for Mozilla browsers

      MIME Type Description Suffixes
      application/x-java-vm Javaâ„¢ Plug-in
      application/x-java-applet Javaâ„¢ Plug-in Applet
      application/x-java-bean Javaâ„¢ Plug-in JavaBeans
      application/x-java-applet;version=1.1 Javaâ„¢ Plug-in
      application/x-java-bean;version=1.1 Javaâ„¢ Plug-in
      application/x-java-applet;version=1.1.1 Javaâ„¢ Plug-in
      application/x-java-bean;version=1.1.1 Javaâ„¢ Plug-in
      application/x-java-applet;version=1.1.2 Javaâ„¢ Plug-in
      application/x-java-bean;version=1.1.2 Javaâ„¢ Plug-in
      application/x-java-applet;version=1.1.3 Javaâ„¢ Plug-in
      application/x-java-bean;version=1.1.3 Javaâ„¢ Plug-in
      application/x-java-applet;version=1.2 Javaâ„¢ Plug-in
      application/x-java-bean;version=1.2 Javaâ„¢ Plug-in
      application/x-java-applet;version=1.2.1 Javaâ„¢ Plug-in
      application/x-java-bean;version=1.2.1 Javaâ„¢ Plug-in
      application/x-java-applet;version=1.2.2 Javaâ„¢ Plug-in
      application/x-java-bean;version=1.2.2 Javaâ„¢ Plug-in
      application/x-java-applet;version=1.3 Javaâ„¢ Plug-in
      application/x-java-bean;version=1.3 Javaâ„¢ Plug-in
      application/x-java-applet;version=1.3.1 Javaâ„¢ Plug-in
      application/x-java-bean;version=1.3.1 Javaâ„¢ Plug-in
      application/x-java-applet;version=1.4 Javaâ„¢ Plug-in
      application/x-java-bean;version=1.4 Javaâ„¢ Plug-in
      application/x-java-applet;version=1.4.1 Javaâ„¢ Plug-in
      application/x-java-bean;version=1.4.1 Javaâ„¢ Plug-in
      application/x-java-applet;version=1.4.2 Javaâ„¢ Plug-in
      application/x-java-bean;version=1.4.2 Javaâ„¢ Plug-in
      application/x-java-applet;version=1.5 Javaâ„¢ Plug-in
      application/x-java-bean;version=1.5 Javaâ„¢ Plug-in
      application/x-java-applet;version=1.6 Javaâ„¢ Plug-in
      application/x-java-bean;version=1.6 Javaâ„¢ Plug-in
      application/x-java-applet;version=1.7 Javaâ„¢ Plug-in
      application/x-java-bean;version=1.7 Javaâ„¢ Plug-in
      application/x-java-applet;jpi-version=1.7.0_40 Javaâ„¢ Plug-in
      application/x-java-bean;jpi-version=1.7.0_40 Javaâ„¢ Plug-in
      application/x-java-applet;deploy=10.40.2 Javaâ„¢ Plug-in
      application/x-java-applet;javafx=2.2.40 Javaâ„¢ Plug-in
      application/x-java-vm-npruntime Javaâ„¢ Plug-in

      Thanks again for your help

      Reply
      • Nice to hear that you got it working and you are welcome! Your output looks good!

        Reply
    13. Thanks for this. I had to make the priorities 170040 to override the system defaults of 170025.

      Reply
      • Hi Russell,

        You are welcome and thanks, I update this guide soon, but actually alternatives –config command is safest way to make sure, that you are using version what you want.

        Reply
1 4 5 6 7 8 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.

Close