If you do not need Java in Safari you should deactivate it. The Java plugin is not available with a fresh macOS installation.
How to fix it
macOS 10.11 – 11.0
Beginning with Safari 12 Java-Plugin is not supported anymore. More Information …
- Open Safari > “Preferences”
- 10.12-: Click the Websites button, then Internet Plug-ins: Website Settings.
- 10.11: Click “Security” > “Plugin-Settings…”
- Disable “Java”

