First things first we need to download and install the latest Java JDK onto our system which you can find here.
Once this has been installed we need to tell the OS to use this latest version of Java instead of the preinstalled one that came with the system.
To do this we are going to open up terminal or your command line interface of choice. I am assuming you are using the bash shell (if you don't know what this means you probably are).