Like Us Like Us Facebook Subscribe Subscribe us YouTube Whatsapp Share us Whatsapp Query Send your queries

Installing Oracle JDK 8 , 9 on any Linux distro

Installing Oracle JDK 8 , 9 on any Linux distro

In this tutorial I am going to show you how to install Oracle JDK 8 , 9 or any version in any linux distro like Ubuntu, OpenSuse, fedora,manjaro, deepin, elementary …. , now google’s android studio (Making Android APPs) prefers Oracle JDK 8 onwards instead of Open JDK so its recommended to use Oracle JDK.

Downloading Oracle JDK

First we have to download oracle jdk to your home folder from , choose tar.gz version as it can be install on any linux. Suppose I have downloaded jdk-8u144-linux-x64.tar.gz. Extract using terminal ….

Open Terminal and run command
tar -zxvf filename
in my case command will be
tar -zxvf jdk-8u144-linux-x64.tar.gz

Copy Extracted folder to /opt folder

Now open Terminal and run command (Require Root Privilage)

sudo cp -pr jdk1.8.0_144  /opt

Backup OpenJDK and Rename it

If you have already installed open jdk(to check run on terminal java -version) then follow this process Open Terminal and run command
sudo mv /usr/bin/java /usr/bin/java_backup

Make symlink for all users:

sudo ln -s /opt/jdk1.8.0_144/jre/bin/java /usr/bin/java

Now run java -version in terminal

oracle jdk terminal

Video Tutorial for Installing Oracle Java JDK on Linux

Set or Configure Java and Javac Environment Variable for Windows

Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments
Do you have any Query / Suggestion