Malware, that annoying stuff that gets downloaded to your computer can be prevented with a good anti-malware program such as Mallwarebytes, however, Just like a vampire malware can still come in if you give it permission to do so.
In this case as shown here, the malware is in the form of an update notification telling you to update your Java. The page looks very accurate until you look at the address at the top. If this was really a Java update, then the address would be from Java.com or Oracle.com. Clicking on the link to “update” your computer will allow malware to be installed on your computer.
The moral: Read the address before you click!