6

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?

0

4 Answers 4

22

Probably you are missing httpcore jar.

Sign up to request clarification or add additional context in comments.

Comments

3

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.

3 Comments

I was indeed missing the httpcore jar, but I can only accept one answer.
No worries, just glad to provide assistance. :)
Hyperlink is broken
2

I think you'll also need:

httpcore-4.x.x.jar

1 Comment

I was indeed missing the httpcore jar, but I can only accept one answer.
1

http://findjar.com/class/org/apache/http/HttpResponse.html

1 Comment

I was indeed missing the httpcore jar, but I can only accept one answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.