I used the following scripts https://www.jamf.com/jamf-nation/discussions/29555/script-to-install-update-java to push java updates from self service but the update fails on my test machine. Below is the log error:
hdiutil: attach failed - image not recognized
installer: Error - the package path specified was invalid: '/Volumes/Java 8 Update 201/Java 8 Update 201.app/Contents/Resources/JavaAppletPlugin.pkg'.
Unmount failed for /Volumes/Java 8 Update 201