Stijn.V
Stijn.V

Reputation: 617

Missing dependency for HttpClient

I'm using a HttpClient in a Java desktop application. I've added httpclient-4.0.1.jar and httpmime-4.0.1.jar to the build path, but I receive the error 'The type org.apache.http.HttpResponse cannot be resolved. It is indirectly referenced from required .class files'. Does anyone know which dependency/jar I'm missing?

Upvotes: 6

Views: 15747

Answers (4)

Michael
Michael

Reputation: 7438

That class is part of the HttpCore library, here's a link showing it's uses:

http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/class-use/HttpResponse.html

You'll need to include the jar in your classpath / lib.

Upvotes: 3

planetjones
planetjones

Reputation: 12633

I think you'll also need:

httpcore-4.x.x.jar

Upvotes: 2

sudmong
sudmong

Reputation: 2036

Probably you are missing httpcore jar.

Upvotes: 22

Related Questions