I want to download the httpConnection class from apache but I cant find a link, also need to know how to import it and where to put the class files when i have them.
You mean the org.apache.http.HttpConnection
interface? That's part of the HttpComponents Core library. You can just download it from here. Extract the zip and just put the JAR file containing the classes in the classpath.
Update: as per your comment, I see that you're totally new to Java. I would strongly recommend to leave the HttpConnection
bit for what it is and start to familiarize yourself with the basic Java concepts. This is a good place to get started. The classpath part is explained in this chapter and in more technical detail in this article.
Note that there are basically two ways to define the classpath, one using the %CLASSPATH%
environment variable and other using the -classpath
or -cp
argument of javac.exe
and java.exe
. You can use only the one or the other, not both. I'd suggest to just use the -cp
argument.