Installing Java 8 on ubuntu

  1. Check if java is already present
  2. If open jdk is present remove it by using
    sudo apt-get purge openjdk* 
  3. Now add the repository, update it and install java 8
    sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update
    sudo apt-get install oracle-java8-installer
  4. Lastly , set the environment variables. I would suggest you to use defaults 🙂  
    sudo apt-get install oracle-java8-set-default

One thought on “Installing Java 8 on ubuntu

Leave a Reply

Your email address will not be published. Required fields are marked *