Just to have it all in “one basket”:

  1. Installation using repository:
    • sudo apt-add-repository ppa:webupd8team/java
    • sudo apt-get update
    • sudo apt-get install oracle-java8-installer
      • you will have to confirm 2 windows before installation starts
    • export JAVA_HOME=/usr/lib/jvm/java-8-oracle
    • check with:
      • java -version
  2. Installation using manually downloaded file:
    • download java from Oracle
    • unzip it