There is a new malware threat from Java. At the end of this email is an article that advises disabling Java from your computer.
To disable Java from Safari, open Preferences, then Security. Make sure that “Enable Java” is unchecked. Java is not needed for most websites anymore. It was popular a long time ago for certain online games. It is still used in some business applications. But it is often used by malicious hackers, including one that used malware to attack a large number of Macs last year.
You might find that it is already disabled on your machine, since Apple no longer enables it by default. Otherwise, my advice would be to disable it and only use it if it is needed for a trusted application.