In Windows, use the Java Control Panel and select the "Advanced" tab.
At the very bottom of the list, completely out-of-sight unless you scroll aaaaaaal the way down, in a category called "Beware of the Leopard"... no, sorry, I meant "Miscellaneous"... there's a checkbox labeled "Suppress sponsor offers when installing or updating Java".
Of course, by default it's not checked. Because money.
But check it and apply or "OK" the settings change. In the current implementation, this prevents bundling the Ask.com malware with Java upgrades -- it's a pre-opt-out, and you never have to think of it again. (At least, until Oracle decides the option should auto-magically unset itself when the user's not looking. Because money.)
Assuming this option continues to exist in future Oracle Java versions and is honored for the Yahoo tie-in, this would alleviate the pre-opt-in crapware issue. Big assumptions, of course, because Oracle.
(Or alternately, don't install Java if you don't actually need it. Or install OpenJava rather than Oracle's.)