How to import the HttpClient library?

1

Where should I put the library HttpClient ? In all tutorials you can find only examples of codes, but no one really explains that after downloading, we should put where?

link

There are two types, one with httpclient-4.3.6.jar and the other with Java files, where I put the files to import, for example: org.apache.http.client.methods.HttpPost

    
asked by anonymous 23.12.2014 / 22:17

1 answer

1

You have to specify the libraries you are using in your classpath . However depending on the type of project you are developing, there are some "conventions".

For example, if you are creating a java web project with eclipse, the location where you would have to put the JARs would be: WebContent/WEB-INF/lib .

If you are doing a 'free-style' project, you can check out how to import the library into this link: link

If it's a project with Maven , you do not need to download JAR, just add the dependency on pom.xml and so on Go.

    
27.12.2014 / 03:26