If you have multiple java versions, such as JDKs, then remove all versions of java. After that, download the offline installer off here.
If you need the JDKs for whatever reason, you can do one of two things:
1. Download portable versions of the jdks and point to them when running the application you need to run.
2. If you don't want to uninstall, set the java HOME path to JRE8, and default .jars to JRE8. When you launch another app that needs JDK, point to it with a .bat file or something.