Install Sun/Oracle Java JDK/JRE 6u45 on Fedora 19/18, CentOS/RHEL 6.4/5.9 - Comment Page: 2

Please note: This guide still working normally if you want install Sun/Oracle Java 6, but if you want Java 8 version, then check Install Oracle Java JDK/JRE 8 on Fedora, CentOS/RHEL or if you want Java 7 version, then check Howto Install Sun/Oracle Java JDK/JRE 7 on Fedora, CentOS/Red Hat (RHEL). By default, Fedora 19/18/17/16/15/14/13/12 and CentOS/Red Hat (RHEL) 6.4/6.3/6.2/6.1/6/5.9 Linux operating systems use the OpenJDK Java, which is a good choice for normal use and it works with almost all the Java programs normally. OpenJDK is also easy to install and maintain with YUM package management, but some cases, Sun/Oracle Java installation is necessary, for example, if some program...

145 comments on “Install Sun/Oracle Java JDK/JRE 6u45 on Fedora 19/18, CentOS/RHEL 6.4/5.9 - Comment Page: 2

1 2 3 4 5
    1. I wanted to thank you for the tutorial and ask permission to write an translated version in my language (romanian) on my blog.

      Reply
      • Hi Madalinux, nice to see you here!

        Glad to hear that you like this guide. Yes you can write translated version of this tutorial to your blog in your own language. :)

        Reply
    2. I have problems with the version of java

      java -version
      Error: dl failure on line 508
      Error: failed /opt/jdk1.7.0/jre/lib/i386/server/libjvm.so, because /opt/jdk1.7.0/jre/lib/i386/server/libjvm.so: cannot enable executable stack as shared object requires: Permission denied

      thanks

      Reply
      • Hi edwin,

        Do you have installed Sun Java 7?

        Do you get some SELinux warning?

        You could try following as root:

        
        chcon -t execmem_exec_t ' /opt/jdk1.7.0/jre/lib/i386/server/libjvm.so'
        
        Reply
        • Great write up by the way!!! really helped me out

          I did receive a SELinux warning. I ran “execstack -c /usr/lib64/mozilla/plugins/libjavaplugin.so” as root and that fixed it for me.

          —-Here was the SELinux warning—–
          Summary:

          SELinux is preventing /usr/lib64/firefox-3.6/firefox from making the program
          stack executable.

          Detailed Description:

          The firefox application attempted to make its stack executable. This is a
          potential security problem. This should never ever be necessary. Stack memory is
          not executable on most OSes these days and this will not change. Executable
          stack memory is one of the biggest security problems. BLAH,BLAH,BLAH (I shortened this because really irrelevant)

          Allowing Access:

          Sometimes a library is accidentally marked with the execstack flag, if you find
          a library with this flag you can clear it with the execstack -c LIBRARY_PATH.
          Then retry your application. If the app continues to not work, you can turn the
          flag back on with execstack -s LIBRARY_PATH.

          Reply
          • Hi Kc,

            Thanks for the notification and fix!

            Did you get this SELinux warning on Fedora 14?

            Reply
    3. Worked a charm! Please consider doing screencasts demonstrating same. I use screencast-o-matic

      thank you!
      Dennis

      Reply
    4. BTW, could you do a write up on how to get google chrome or chromium browser to play nice with java applets?

      Reply
    5. Jumped the gun. Java is installed.
      [[email protected] ~]$ java -version
      java version “1.6.0_22”
      Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
      Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)

      mozilla about:plugins shows java plugins installed

      BUT when I try to run open a java applet I get this err in the terminal:

      LoadPlugin: failed to initialize shared library /usr/java/jre1.6.0_22/lib/i386/libnpjp2.so [/usr/java/jre1.6.0_22/lib/i386/libnpjp2.so: cannot enable executable stack as shared object requires: Permission denied]

      Can you please help? That error is the same error I got following Oracle’s ‘exact’ instructions. “Exact” because there is a human to mess it up, me. :(

      All help appreciated!
      Dennis

      Reply
      • Hi Dennis,

        I think that SELinux is causing this error.

        Could you post SELinux error report?

        Reply
        • Bingo. SELinux was the problem.
          This fixed it.

          914 sudo chcon -t execmem_exec_t ‘/usr/lib/firefox-3.6/firefox’
          915 echo to set SELINUX params to hopefully allow SOM to work

          Java applet now works. Thanks for the pointer and the very helpful info above!

          Dennis

          Reply
          • Excellent! Nice to hear that you got it working.

            Reply
            • sudo chcon -t execmem_exec_t ‘/usr/lib/firefox-3.6/firefox’

              above is the key to enable JRE in Firefox ………….i have been working for few days, finally this is the one solve my few days try and errors session

              thanks for the advice

              Reply
    6. […] Sun’s Java, because I think NetBeans works faster with Sun’s Java. Here is the guide, howto install Sun/Oracle Java JDK 6 on Fedora, CentOS, Red Hat (RHEL). OpenJDK should also work.2. Download NetBeans 7.0 Beta from Sun’s NetBeans 7.0 download page […]

      Reply
    7. Thanks a lot!!!! That works! Very useful article!

      Reply
    8. […] Install Sun/Oracle Java JDK/JRE 6u23 on Fedora 14, CentOS/RHEL 5.5/6 – December 26th ( tags: java linux fedora centos howto installation sun browser ) […]

      Reply
    9. Hi,

      Thanks for such a wonderful and descriptive post.

      I’m facing an issue. After running all the steps mentioned in the post, when I try running the command “javac -version”, I’m getting the following error message:

      [[email protected] suraj]# javac -version
      bash: javac: command not found…
      Similar command is: ‘java’

      I’m quite new to Linux, and am using Fedora14. Please provide a solution to this problem

      Thanks in advance….
      Suraj

      Reply
      • Hi Suraj,

        Did you install the JRE or JDK?

        Reply
    10. Thank you for your excellent guide. Great work!

      Reply
    11. this tutorial really helpful. thanks.

      Reply
    12. Hi,

      Probably I’ve messed up big time… :)
      Will try installing from scratch once again…

      Reply
    13. Congrats!!… this is a really good and comprehensive guide.
      Keep up the good work!

      Reply
    14. I have 64 bit RHEL 6 installed.
      Need to use ModJK for Apache and Tomcat.
      Installed jdk1.6.0_23 in /usr/java. From Oracles site downloaded jdk-6u23-linux-x64-rpm.bin.
      One of the instructions is to insert this in the /etc/httpd/conf/workers.properties file:

      # Unix – Sun VM or blackdown
      worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)i386$(ps)server$(ps)libjvm.so

      I only have the libjvm.so in:

      /usr/java/jdk1.6.0_23/jre/lib/amd64 ??????? I have a x86_64 Xeon. I presume ‘amd64’ doesny mean it is a amd processor??

      Is this the correct file for Redhat 6 64 bit? Should I ask Oracle instead?

      Reply
      • Hi Barrie,

        Amd64 should work OK with Xeon I guess, but this

        
        # Unix – Sun VM or blackdown
        worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)i386$(ps)server$(ps)libjvm.so
        

        Need little modification, it should maybe look following:

        
        If you have libjvm.so directly under amd64 path then use:
        worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)amd64$(ps)libjvm.so
        
        OR if libjvm.so is under amd64/server/ directory then use:
        worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)amd64$(ps)server$(ps)libjvm.so
        

        And here is therefore expected that you have:
        workers.java_home variable with /usr/java/jdk1.6.0_23/
        and
        ps variable with /

        Reply
    15. This guide is simply the best!

      Cheers!

      Reply
1 2 3 4 5

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