This us how you prevent the Ask toolbar when installing Java.
If you download the Java Offline utility, then you will not get the bundled crapware.
You can usually download from the official Java download page: Java or from the direct link:http://javadl.sun.com/webapps/download/AutoDL?BundleId=83383
Another option is to install Java through: Ninite
Preventing ask.com domain through Hostfile:
Open start menu
Right click on that, and select “Run as administrator”
Open file “c:\windows\system32\drivers\etc\hosts”
Add the following line without the quotationsmarks and save file.
When you have done this, whenever your programs request the ask.com domain, the request get redirected to itself, effectively cutting all ties to the ask.com website