jakarta..how does it work?

E

Eridano

Hi folks.

I installed recently j2sdk1.4.2 (with netbeans 3.5) in my pc (the
directory is
"C:\Program Files\j2sdk_nb\j2sdk1.4.2") and after, I asked how to
create http client, I download jakarta (HttpClient). I unzip ... it
created a directory "\commons-httpclient-2.0-beta2". I put this
directory into the "C:\Program
Files\j2sdk_nb\j2sdk1.4.2\commons-httpclient-2.0-beta2"..I opened
ClientApp.java (it's a sample for use of jakarta) and during the
compilation Netbeans (java) displaied the following error messages :

ClientApp.java [85:1] package org.apache.commons.httpclient does not
exist
import org.apache.commons.httpclient.HttpClient;
^
So, where I have to put the jakarta directory or what have I to do to
continue?

Ivan
 
J

J

Hi folks.

I installed recently j2sdk1.4.2 (with netbeans 3.5) in my pc (the
directory is
"C:\Program Files\j2sdk_nb\j2sdk1.4.2") and after, I asked how to
create http client, I download jakarta (HttpClient). I unzip ... it
created a directory "\commons-httpclient-2.0-beta2". I put this
directory into the "C:\Program
Files\j2sdk_nb\j2sdk1.4.2\commons-httpclient-2.0-beta2"..I opened
ClientApp.java (it's a sample for use of jakarta) and during the
compilation Netbeans (java) displaied the following error messages :

ClientApp.java [85:1] package org.apache.commons.httpclient does not
exist
import org.apache.commons.httpclient.HttpClient;
^
So, where I have to put the jakarta directory or what have I to do to
continue?

Ivan

You need to place the directory into the classpath.

First, don't put third party pacakages into the JDK directory. Just a matter
of style. Put them into their own directory. But that is not the problem.

There should be a jar called http-client.jar (or something very similar to
that.) That file needs to placed on the class path. I don't use netbeans,
but there should be a way to load jar files into your project. Once you load
that jar file into the project, then you should be ready.

J
 

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

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top