缺少 HttpClient 的依赖项

发布于 2024-11-15 02:32:18 字数 197 浏览 4 评论 0原文

我在 Java 桌面应用程序中使用 HttpClient。我已将 httpclient-4.0.1.jarhttpmime-4.0.1.jar 添加到构建路径,但收到错误“The type org.apache. http.HttpResponse 无法解析。它是从所需的 .class 文件间接引用的。有谁知道我缺少哪个依赖项/jar?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

冧九 2024-11-22 02:32:18

可能您缺少 httpcore jar。

Probably you are missing httpcore jar.

明媚殇 2024-11-22 02:32:18

该类是 HttpCore 库的一部分,这里有一个显示其用途的链接:

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

你'需要将 jar 包含在您的类路径/lib 中。

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.

两人的回忆 2024-11-22 02:32:18

我想你还需要:

httpcore-4.x.x.jar

I think you'll also need:

httpcore-4.x.x.jar
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文