First uninstall java 7 and install the last version of java 8 that installs correctly. (8u152)
Link:
http://i430vx.ddns.net./files/XP/EOL/jre-8u152-windows-i586.exe
Then head over to here:
http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
Locate the file called "jre-8u172-windows-i586.tar.gz"
accept the liscence agreement and download it.
use a program such as 7-zip (https://www.7-zip.org/) to extract it (it seems to be two archives, the second one does not have an extension but 7-zip will extract it anyways)
once you get a folder with the java stuff...
go inside the jre1.8.0_172 folder
copy everything that is inside.
then go to c:/program files/java or wherever you installed 8u152
and go into the jre1.8.0_152 folder.
paste the files you copied inside. hit yes on any messages that ask if you want to replace/overwrite files.
and you are done!
If you require java to work in internet browsers you will need to go to the control panel, open the java icon, go to the security tab.
uncheck enable java content for browsers
hit apply
check it again
hit apply
And Bob's your Uncle!