1.add repository

apt add-repository ppa:webupd8team/java

2.update

apt update

3.install

apt install oracle-java8*