| Author |
Referencing Jar files
|
Anjanesh Lekshminarayanan
Ranch Hand
Joined: Oct 21, 2003
Posts: 46
|
|
Hi I extracted a .zip file to the same folder where my java files reside. The zip extracted is a folder containing jar files located at httpcomponents-client-4.0-alpha2\lib javac currently shows package-not-found errors when I try to import import org.apache.commons.httpclient.Cookie; How do I get it to recognize those 4 jars ? Thanks
|
Anjanesh Lekshminarayanan
|
 |
Martijn Verburg
author
Bartender
Joined: Jun 24, 2003
Posts: 3268
|
|
You need to add httpcomponents-client-4.0-alpha2\lib to your CLASSPATH when you compile e.g. javac -cp .\httpcomponents-client-4.0-alpha2\lib\NameOfYourJARFile.jar *.java Cheers, Martijn [ December 12, 2007: Message edited by: Martijn Verburg ] [ December 12, 2007: Message edited by: Martijn Verburg ]
|
Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
|
 |
Anjanesh Lekshminarayanan
Ranch Hand
Joined: Oct 21, 2003
Posts: 46
|
|
Still didnt work. But giving the full jar name worked. javac -classpath httpcomponents-client-4.0-alpha2/lib/httpcore-4.0-alpha6.jar myProg.java
|
 |
 |
|
|
subject: Referencing Jar files
|
|
|