To fix this, for those who need Java
Go into system preferences - Security &Privacy
Under general tab, click advance button, tick off the automatically update safe download list
This essentially will prevent apple from updating your system settings, you switch off e virus protection of Mac OS so put it back on once java is fixed.
Locate the core.types.bundle under system - library - core services
Right mouse lick, then choose show package contents in the pop up menu,
Go to contents - resources - xprotect.meta.plist
Right mouse click, adjust authorizations for everyone to read write. Copy the file to your desktop.
Open it in text edit, set the java version back tom1.7.11.21
Save, copy file back into the bundle and restart your machine
Apple is an ******* company for managing security like this. They knocked out my corporate VPN connection for hours so I couldn't work.
A virus is not much worse. The do not have a clue what their business customers are doing.