Java 我在哪里可以下载 org.apache.http 包的 jar 包?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1932321/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 01:33:28  来源:igfitidea点击:

where can i download the jar for org.apache.http package?

javaapachejar

提问by sarah

I want the jar filefor org.apache.httppackage but i am not able to find it,can anyone let me know from where can i download it?

我想要包的jar 文件org.apache.http但我找不到它,谁能告诉我从哪里下载它?

I was not able to find the jar even in Apache site as well findjar.cosite.

即使在 Apache 站点以及findjar.co站点中,我也无法找到该 jar 。

采纳答案by ZoogieZork

Apache HttpCore

Apache HttpCore

Updated with new link

更新了新链接

回答by Atul Singh

You can add org.apache.httpby using below code in app:Build gradle

您可以org.apache.http使用以下代码添加app:Build gradle

dependencies {
    compile 'org.apache.httpcomponents:httpclient:4.5'
}

回答by BeatingBytes

http://www.java2s.com/Code/Jar/s/Downloadservletapijar.htm

http://www.java2s.com/Code/Jar/s/Downloadservletapijar.htm

Download servlet-api.jar That has all the files below:

下载 servlet-api.jar 包含以下所有文件:

META-INF/LICENSE
META-INF/MANIFEST.MF
META-INF/NOTICE
javax.servlet.Async

Context.class
javax.servlet.AsyncEvent.class
javax.servlet.AsyncListener.class
javax.servlet.DispatcherType.class
javax.servlet.Filter.class
javax.servlet.FilterChain.class
javax.servlet.FilterConfig.class
javax.servlet.FilterRegistration.class
javax.servlet.GenericServlet.class
javax.servlet.HttpConstraintElement.class
javax.servlet.HttpMethodConstraintElement.class
javax.servlet.MultipartConfigElement.class
javax.servlet.Registration.class
javax.servlet.RequestDispatcher.class
javax.servlet.Servlet.class
javax.servlet.ServletConfig.class
javax.servlet.ServletContainerInitializer.class
javax.servlet.ServletContext.class
javax.servlet.ServletContextAttributeEvent.class
javax.servlet.ServletContextAttributeListener.class
javax.servlet.ServletContextEvent.class
javax.servlet.ServletContextListener.class
javax.servlet.ServletException.class
javax.servlet.ServletInputStream.class
javax.servlet.ServletOutputStream.class
javax.servlet.ServletRegistration.class
javax.servlet.ServletRequest.class
javax.servlet.ServletRequestAttributeEvent.class
javax.servlet.ServletRequestAttributeListener.class
javax.servlet.ServletRequestEvent.class
javax.servlet.ServletRequestListener.class
javax.servlet.ServletRequestWrapper.class
javax.servlet.ServletResponse.class
javax.servlet.ServletResponseWrapper.class
javax.servlet.ServletSecurityElement.class
javax.servlet.SessionCookieConfig.class
javax.servlet.SessionTrackingMode.class
javax.servlet.SingleThreadModel.class
javax.servlet.UnavailableException.class
javax.servlet.annotation.HandlesTypes.class
javax.servlet.annotation.HttpConstraint.class
javax.servlet.annotation.HttpMethodConstraint.class
javax.servlet.annotation.MultipartConfig.class
javax.servlet.annotation.ServletSecurity.class
javax.servlet.annotation.WebFilter.class
javax.servlet.annotation.WebInitParam.class
javax.servlet.annotation.WebListener.class
javax.servlet.annotation.WebServlet.class
javax.servlet.descriptor.JspConfigDescriptor.class
javax.servlet.descriptor.JspPropertyGroupDescriptor.class
javax.servlet.descriptor.TaglibDescriptor.class
javax.servlet.http.Cookie.class
javax.servlet.http.HttpServlet.class
javax.servlet.http.HttpServletRequest.class
javax.servlet.http.HttpServletRequestWrapper.class
javax.servlet.http.HttpServletResponse.class
javax.servlet.http.HttpServletResponseWrapper.class
javax.servlet.http.HttpSession.class
javax.servlet.http.HttpSessionActivationListener.class
javax.servlet.http.HttpSessionAttributeListener.class
javax.servlet.http.HttpSessionBindingEvent.class
javax.servlet.http.HttpSessionBindingListener.class
javax.servlet.http.HttpSessionContext.class
javax.servlet.http.HttpSessionEvent.class
javax.servlet.http.HttpSessionListener.class
javax.servlet.http.HttpUtils.class
javax.servlet.http.NoBodyOutputStream.class
javax.servlet.http.NoBodyResponse.class
javax.servlet.http.Part.class
javax/servlet/LocalStrings.properties
javax/servlet/http/LocalStrings.properties
javax/servlet/resources/XMLSchema.dtd
javax/servlet/resources/datatypes.dtd
javax/servlet/resources/j2ee_1_4.xsd
javax/servlet/resources/j2ee_web_services_1_1.xsd
javax/servlet/resources/j2ee_web_services_client_1_1.xsd
javax/servlet/resources/javaee_5.xsd
javax/servlet/resources/javaee_6.xsd
javax/servlet/resources/javaee_web_services_1_2.xsd
javax/servlet/resources/javaee_web_services_1_3.xsd
javax/servlet/resources/javaee_web_services_client_1_2.xsd
javax/servlet/resources/javaee_web_services_client_1_3.xsd
javax/servlet/resources/web-app_2_2.dtd
javax/servlet/resources/web-app_2_3.dtd
javax/servlet/resources/web-app_2_4.xsd
javax/servlet/resources/web-app_2_5.xsd
javax/servlet/resources/web-app_3_0.xsd
javax/servlet/resources/web-common_3_0.xsd
javax/servlet/resources/web-fragment_3_0.xsd
javax/servlet/resources/xml.xsd

回答by Fernando Gonzalez Sanchez

At the Maven repo, there are samples to add the dependency in maven, sbt, gradle, etc.

在 Maven repo 中,有在 maven、sbt、gradle 等中添加依赖的示例。

https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore/4.4.11

https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore/4.4.11

ie for Maven, you just create a project, for example

即对于Maven,您只需创建一个项目,例如

mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4

then look at the pom.xml, then at the library at the dependencies xml element:

然后查看 pom.xml,然后查看依赖项 xml 元素处的库:

<dependency>
    <groupId>org.apache.httpcomponents</groupId>
    <artifactId>httpcore</artifactId>
    <version>4.4.11</version>
</dependency>

For sbt do something like

对于 sbt 做类似的事情

sbt new scala/hello-world.g8

then edit the build.sbt to add the library

然后编辑 build.sbt 添加库

libraryDependencies += "org.apache.httpcomponents" % "httpcore" % "4.4.11"