i am trying to get all the links from web shearch. but i have an errors when i wrote an:
package org.htmlparser.Parser;

The declared package "org.htmlparser.Parser" does not match the expected package "hw"

and :
Parser parser = new Parser ("http://yadda");


The constructor Parser(String) is undefined

the full code,thanks for helping me:


Java Code:
package hw;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
package org.htmlparser.Parser;




import javax.swing.text.html.parser.Parser;
 
public class spy {
 
public static void main(String[] args) {
	
String target = null;
 
	
	try	
	{	
	BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	target= in.readLine();	
	
	}
	catch(IOException e)
	{
	System.out.println("IOException has been caught");
	}
	
	
	shearch(target);
	
}
 
 
private static void shearch(String target) {
	
target = target.trim( );
QueryString query = new QueryString("search", target);
try
{//Open the URL for reading
	URL u = new URL("http://search.dmoz.org/cgi-bin/search?" + query);
    // buffer the input to increase performance 
	InputStream in = new BufferedInputStream(u.openStream());
	// chain the InputStream to a Reader
	InputStreamReader theHTML = new InputStreamReader(in);
	int c;
	Parser parser = new Parser ("http://yadda");

	while ((c = theHTML.read()) != -1)
	{
		System.out.print((char)c);
	}
 
}
catch (MalformedURLException e)
{
	System.err.println(e);
}
catch (IOException e)
{
	System.err.println(e);
}}}