Use Google Search API. There you'll find options whether you want to search Web, a particular site, images. Change that settings as you need...Moreover, you can modify the results as you need by adjusting the properties google suggests. However, I did in .NET, but i hope it could be done in Java too.
More about it can be found here...
http://code.google.com/apis/ajaxsearch/faq/[
^]