To upgrade Java:
Follow instructions to install Java: Install Java
If you have set the environment variable JAVA_HOME, check whether this needs updating. You do not need to set this variable, if it is not already set. Note also that if you have set it, some installations will automatically update it for.
On windows, check the system environment variables to see if JAVA_HOME is set, and if it needs updating to the new base installation of Java, do so
On linux, check in any user session to see whether JAVA_HOME is set, and whether it is up-to-date
Update service script
Unix: update-alternatives?