CentOS 6: Install Oracle JDK


Versions

  1. CentOS 6.5

Note

After completing this guide, java-openjdk will still be a yum dependency and if not already installed, will be installed later by other packages that have the Java JDK as a dependency. There are Sun compatibility RPMs that can be downloaded to fix this, but the version support is old. For more information, see Sources below.

Install

  1. Download the appropriate file (ex: jdk-7u17-linux-x64.tar.gz) JDK from the Oracle website.

    Note

    replace $JDK_FILENAME with the name of the file

  2. Add java as alternative for /usr/bin/java:

    Note

    Default priority of open-jdk 1.7 is 170055. Replace $PRIORITY below with a number higher than the default priority.


Configure

  1. Add JAVA_HOME to environment variables

Verify


Sources

  1. https://www.redbridge.se/blog/-/blogs/properly-installing-oracle-s-jdk-on-centos-rhel-or-scientific-linux

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">