views:

228

answers:

3

I get an "Build failed" error with error output when I try to build my project in Eclipse:

[javac] ......\src\example\servlet\ScrapingServlet.java:10: package org.apache.http.client does not exist [javac] import org.apache.http.client.HttpClient;

But the Eclipse editor does not give any error. I added the jars to the project with Project > properties > add external JARS... and all the JARS are showed in the project explorer. What am I doing wrong?

A: 

Check whether you have added commons-httpclient.jar or not.

Teja Kantamneni
A: 

If you have just added the jars, sometimes you need to do a Clean and then build for it to take effect.

Amber Shah
A: 

Solved my problem. I had to add the filenames of the JARS to the build.xml file.

Derk