How-to Install Oracle JDK 9 on CentOS 32/64bit Easy Guide

May 2nd, 2017 by thelinuxevangelist

Oracle JDK 9 Quick-Start for CentOS




Hello CentOS User! This Shows You Step-by-step How-to Install and Getting-Started with the Latest Oracle-Sun Official Java SE JDK 9 ON CentOS 6.x/7.x i686/x8664 GNU/Linux Desktop/Server.

To SetUp Oracle JDK you will need to Use the update-alternatives Tool to Update your System Java to 1.9 JDK 9.

The Powerful Java 9 New Features:

  • Java REPL Shell jshell
  • Full support for HTTP 2.0, new HTTP client that implement HTTP 2.0 and websockets
  • Java Microbenchmarking Harness
  • Java Process API Boost
  • Debugging in Production

Be aware that at this time the Oracle JDK 9 Installation for GNU/Linux is based on a Early Access Snapshot

Furthermore to Make the Process Easier to Visualize the Post Includes the Basic Screenshots of the Steps Involved.

Install Oracle JDK 9 on CentOS Linux 7.x - Featured
  1. Open a Shell Terminal emulator window
    (Press “Enter” to Execute Commands)

    Install Oracle JDK 9 on CentOS Linux 7.x - Open Terminal
  2. Download Oracle Java SE JDK 9 for Linux:

    Oracle JDK 9 i586/x8664 tar.gz
  3. Double-Click on the tar.gz Archive and Extract into /tmp
    Or from Shell:

    tar xvzf ~/Downloads/jdk-9*.tar.gz -C /tmp/

    Install Oracle JDK 9 on Ubuntu 16.04 Xenial - Java JDK 9 tar.gz Extraction Path

  4. Relocate Java JDK 9

    sudo su

    If Got “User is Not in Sudoers file” then Look: Solution
    Make a java Directory if Not already there with

    if [ ! -d "/usr/java" ]; then mkdir /usr/java; fi

    Set the root superUser as holder:

    chown -R root:root /tmp/jdk-9

    Reiterate the Execution Permission over the Java binaries:

    chmod -R +x /tmp/jdk-9/bin

    Finally Shift the Java content with:

    mv /tmp/jdk-9 /usr/java/
  5. Setup Oracle Java JDK 9

    update-alternatives --install \
    /usr/bin/java java /usr/java/jdk1.9*/bin/java 1065
    
    update-alternatives --install \
    /usr/bin/javac javac /usr/java/jdk1.9*/bin/javac 1065
    
    update-alternatives --install \
    /usr/bin/jar jar /usr/java/jdk1.9*/bin/jar 1065
    
    update-alternatives --install \
    /usr/bin/javaws javaws /usr/java/jdk1.9*/bin/javaws 1065
    

    Checking or Setting the System Java Version in Use with

    update-alternatives --config java
    

    To Switch of Java Version Just Enter the Selection Number on First Column. :)

  6. Setting JAVA_HOME User Environment Variable (Optional)

    su [myUserName]

    Edit the Bash environment Configuration file

    nano $HOME/.bashrc

    Append:

    export JAVA_HOME=/usr/lib/jvm/jdk1.9[uX]

    Replace the [uX] Looking for the Installed Java 9 Version with:

    ls /usr/java

    Ctrl+x to Save & Exit from nano Editor :)
    Load New Bash Config:

    bash
  7. Test New Java JDK 9 Installation

    java -version
  8. Now Thanks to Oracle-Sun Corporation You are Able to Successfully Start Up with Java 9 Development.

    Installing IntelliJ IDEA for Java Scala & Android on CentOS

    Install Latest IntelliJ for CentOS
(Visited 159 times, 1 visits today)
Share on Tumblr

Tags: , , , , , , , , , , , ,


Comments are disabled