apache http components

J

jason

Hello,

Once i have downloaded the binary with dependencies (assuming this is
the right file to be downloading:
http://www.takeyellow.com/apachemir...nts-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!
 
J

Jeff Higgins

Hello,

Once i have downloaded the binary with dependencies (assuming this is
the right file to be downloading:
http://www.takeyellow.com/apachemir...nts-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>
 
A

Arne Vajhøj

Once i have downloaded the binary with dependencies (assuming this is
the right file to be downloading:
http://www.takeyellow.com/apachemir...nts-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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top