Updating Java
One of my Java programs wasn’t working well today on the GUI side of things. I was running Java 7.0 and decided it was time to upgrade to Java 8.0 Thankfully, upgrading to 8.0 seems to have fixed my problems.
Here are the simple commands. To give credit, they are form this page. It has a lot more details as well.
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
# or if you want JDK 8:
# sudo apt-get install oracle-java8-installer
# these commands install Oracle JDK7/8 and set them as default VMs automatically:
# sudo apt-get install oracle-java7-set-default
# sudo apt-get install oracle-java8-set-default