Installing OpenJDK8


Needed to do a project in Java8, here’s how to install openjdk8:

    sudo add-apt-repository ppa:openjdk-r/ppa
    sudo apt-get update
    sudo apt-get install openjdk-8-jdk
    sudo update-alternatives --config java  # select openjdk8
    sudo update-alternatives --config javac  # select openjdk8
    sudo apt-get purge maven maven2 maven3
    sudo add-apt-repository ppa:andrei-pozolotin/maven3
    sudo apt-get update
    sudo apt-get install maven3