Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

package org.apache.commons.httpclient does not exist

807580Jan 30 2010 — edited Jan 30 2010
Hello there
I just tried to test YahooWebServiceGet.java and YahooWebServiceParseResults.java in netbeans. To do so I included all the jar files from httpcomponents-client-4.0.1/lib/ in the netbeans project classpath. As far as it seems, this jar files do not include package org.apache.commons.httpclient because to start with I am getting errors at these sentences:

import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.methods.*;

import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.methods.GetMethod;

Does anyone know what must be done to compile and test this classes YahooWebServiceGet.java and YahooWebServiceParseResults.java successfully?

Thanks in advance

Comments

807580
HTTPClient usage: http://hc.apache.org/httpclient-3.x/tutorial.html

Make sure you have javax.xml.*; (which you should have)

Then import the Yahoo .java files.

P.s. I'm using JDeveloper.
807580
Thanks
Eventually I discovered that the only problem was that I was using httpclient-4 instead of httpclient-3. I would think that a newer version should be able to run at least the code which could be run in previous versions. That is why it still surprises me. Any explanation?
1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 27 2010
Added on Jan 30 2010
2 comments
3,469 views