How-to Install Oracle JDK 9 on Ubuntu 16.04 Xenial 32-64bit Linux+GNU Easy Guide

May 20th, 2016 by thelinuxevangelist

Oracle JDK 9 QuickStart for Ubuntu 16.04 Xenial

The Linux Tutorial Shows You Step-by-Step How-to Install and Getting-Started with the Latest Oracle-Sun Official Java SE JDK 9 on Ubuntu 16.04 Xenial Xerus LTS i386/Amd64 GNU/Linux Desktop.

To SetUp You will need to Use the update-alternatives Tool to Update your System Java to 1.9 JDK9.

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

At this time the Oracle JDK 9 Installation for Ubuntu is based on a Early Access Snapshot

To Make the Entire Process Easier to Visualize and Retain the Post Includes the Basic Screenshots of the Essentials Steps Involved.

The Content and Details of How-to Install Oracle JDK 9 on Ubuntu 16.04 Xenial are Expressly Reduced to Give Focus Only to the Essentials Instructions and Commands and Make Tut Easier to Read & Digest ;)

getting-started with Oracle JDK 9 on Ubuntu 16.04 Xenial - Featured
  1. Download Oracle Java SE JDK9 for Linux:

    Oracle JDK9 i586/x8664 tar.gz
  2. 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

  3. Open a Shell Terminal emulator window
    Ctr+Alt+t on Desktop
    (Press “Enter” to Execute Commands)

    Installing Oracle JDK 9 on Ubuntu 16.04 Xenial - Open Terminal
  4. Relocate Java JDK 9

    sudo su

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

    if [ ! -d "/usr/lib/jvm" ]; then mkdir /usr/lib/jvm; 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/lib/jvm/
  5. Installing Oracle Java JDK 9
    You can directly Copy & Paste the Commands into Terminal…

    update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-9/bin/java 1065
    update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-9/bin/javac 1065
    update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk-9/bin/jar 1065
    update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk-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. :)

    getting-started with Oracle JDK 9 on Ubuntu 16.04 Xenial - JDK Configuration

  6. (Optional) Setting JAVA_HOME User Environment Variable

    su [myUserName]

    Edit the Bash environment Configuration file

    nano $HOME/.bashrc


    export JAVA_HOME=/usr/lib/jvm/jdk-9

    Check the Installed Java 9 Version exact PATH with:

    ls /usr/lib/jvm/

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

  7. Test New Java JDK 9 Installation

    java -version
  8. How-to Install Netbeans 8 IDE for Java 9 on Ubuntu:
    Setup NetBeans Java for Linux.

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

    Welcome to Java 9 New Dev Env! ;)

Share on Tumblr

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

Comments are disabled