From: jason on
Hello,

Once i have downloaded the binary with dependencies (assuming this is
the right file to be downloading:
http://www.takeyellow.com/apachemirror/httpcomponents/httpclient/binary/httpcomponents-client-4.0.1-bin-with-dependencies.tar.gz)

How do I go about adding this to my java library such that I may use
it in any and all future projects as an import?

ie. When I go to run their sample program (http://svn.apache.org/repos/
asf/httpcomponents/httpcore/tags/4.0.1/httpcore/src/examples/org/
apache/http/examples/ElementalHttpGet.java) I am given an error that
the import cannot be resolved.

any help would be largely appreciated. i am sure this is a very simple
error i have just never needed to use an outside library until now.

thank you!
From: Jeff Higgins on
On 5/27/2010 3:37 PM, jason wrote:
> Hello,
>
> Once i have downloaded the binary with dependencies (assuming this is
> the right file to be downloading:
> http://www.takeyellow.com/apachemirror/httpcomponents/httpclient/binary/httpcomponents-client-4.0.1-bin-with-dependencies.tar.gz)
>
> How do I go about adding this to my java library such that I may use
> it in any and all future projects as an import?
>
> ie. When I go to run their sample program (http://svn.apache.org/repos/
> asf/httpcomponents/httpcore/tags/4.0.1/httpcore/src/examples/org/
> apache/http/examples/ElementalHttpGet.java) I am given an error that
> the import cannot be resolved.
>
> any help would be largely appreciated. i am sure this is a very simple
> error i have just never needed to use an outside library until now.
>
> thank you!
<http://java.sun.com/javase/6/docs/technotes/tools/findingclasses.html>

From: jason on
On May 27, 5:07 pm, Jeff Higgins <oohigg...(a)yahoo.com> wrote:
> On 5/27/2010 3:37 PM, jason wrote:
>
> > Hello,
>
> > Once i have downloaded the binary with dependencies (assuming this is
> > the right file to be downloading:
> >http://www.takeyellow.com/apachemirror/httpcomponents/httpclient/bina...)
>
> > How do I go about adding this to my java library such that I may use
> > it in any and all future projects as an import?
>
> > ie. When I go to run their sample program (http://svn.apache.org/repos/
> > asf/httpcomponents/httpcore/tags/4.0.1/httpcore/src/examples/org/
> > apache/http/examples/ElementalHttpGet.java) I am given an error that
> > the import cannot be resolved.
>
> > any help would be largely appreciated. i am sure this is a very simple
> > error i have just never needed to use an outside library until now.
>
> > thank you!
>
> <http://java.sun.com/javase/6/docs/technotes/tools/findingclasses.html>

thanks jeff!
From: Arne Vajhøj on
On 27-05-2010 15:37, jason wrote:
> Once i have downloaded the binary with dependencies (assuming this is
> the right file to be downloading:
> http://www.takeyellow.com/apachemirror/httpcomponents/httpclient/binary/httpcomponents-client-4.0.1-bin-with-dependencies.tar.gz)
>
> How do I go about adding this to my java library such that I may use
> it in any and all future projects as an import?
>
> ie. When I go to run their sample program (http://svn.apache.org/repos/
> asf/httpcomponents/httpcore/tags/4.0.1/httpcore/src/examples/org/
> apache/http/examples/ElementalHttpGet.java) I am given an error that
> the import cannot be resolved.
>
> any help would be largely appreciated. i am sure this is a very simple
> error i have just never needed to use an outside library until now.

Command line you can use the -classpath switch to point to the
jar file.

In your IDE you can add the jar to the classpath inside the IDE
(exactly how depends on what IDE).

For deployment it depends on the type of app, but for a desktop
app, then adding a Class-Path directive to you manifest is
an obvious option.

Never use the global CLASSPATH env variable.

Arne