How to access a Search Engine in Java?

I want to design a simple programme which need to access a Search Engine to get the results, but I do not know how to access a Search Engine.Please help me!
[177 byte] By [littlenn] at [2007-9-26 16:22:51]
# 1

You're talking about a search engine like Google or Yahoo!, right? If so, being that these are web-based applications, you can connect to these services using the java.net.HttpUrlConnection interface, issue them a query in URL format, and then parse the returned HTML.

Your code will have to contain some specifics on the implementation of the search engine you use (the query URL and format, and the structure of the result page) - these could potentially change without notice, your code will break when this happens.

Not so simple, is it?

javastevec at 2007-7-2 19:55:37 > top of Java-index,Other Topics,Java Community Process (JCP) Program...