Installing java 8 on Ubuntu server

Installing java8 on ubuntu server is super easy. Just follow these commands to install it.

sudo add-apt-repository ppa:webupd8team/java

sudo apt update;

Install java.

sudo apt install oracle-java8-installer

After installing check your installation using following commands.

javac -version

create Env variables

sudo apt install oracle-java8-set-default

Let me know in comments if any issues.

The following two tabs change content below.
He is founder and CTO of He senior software architect. He is guru of various Mobile and web technologies including Node.js, Angular.js, Meteor.js. He is founder member of habilelabs Pvt. Ltd.