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.

      • 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. :)

    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/, because /opt/jdk1.7.0/jre/lib/i386/server/ cannot enable executable stack as shared object requires: Permission denied


      • 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/'
        • Great write up by the way!!! really helped me out

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

          —-Here was the SELinux warning—–

          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.

          • Hi Kc,

            Thanks for the notification and fix!

            Did you get this SELinux warning on Fedora 14?

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

      thank you!

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

    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/ [/usr/java/jre1.6.0_22/lib/i386/ 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!

      • Hi Dennis,

        I think that SELinux is causing this error.

        Could you post SELinux error report?

        • 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!


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

            • 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

    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 […]

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

    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 ) […]

    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….

      • Hi Suraj,

        Did you install the JRE or JDK?

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

    11. this tutorial really helpful. thanks.

    12. Hi,

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

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

    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/ file:

      # Unix – Sun VM or blackdown

      I only have the 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?

      • Hi Barrie,

        Amd64 should work OK with Xeon I guess, but this

        # Unix – Sun VM or blackdown

        Need little modification, it should maybe look following:

        If you have directly under amd64 path then use:
        OR if is under amd64/server/ directory then use:

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

    15. This guide is simply the best!


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.