I installed Oracle JDK on Ubuntu 16.04 LTS using the following commands:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
But I tried various suggestions from the forums and that didn't solve the issue. I purged the ppa and did an update also but it wouldn't remove.