That would mean that commons-logging.jar is not in your current working directory. Perhaps it's in the same directory as commons-httpclient.jar? If so, then you should say that in your classpath.
Nishanth Thomas
Greenhorn
Joined: Sep 08, 2011
Posts: 7
posted
0
By Nishanth Thomas ISG Bangalore
try this
First check your class path
by
echo $CLASSPATH
if not set
CLASSPATH=".:/usr/java/jdk1.6.0_05/bin"
and complie like this which takes all jar in the folder or give path
and complie like this which takes all jar in the folder or give path
javac -cp :\* test.java
then run
java -cp :\* test
There are two things wrong with this
1. The JDK bin directory does not contain any jar files or classes so does not need to be in the CLASSPATH. You probably do need it in your PATH environment variable.
2. There is no point in setting a CLASSPATH environment variable if you are going to use the -cp option, as this will cause the environment variable to be ignored.
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32611
4
posted
0
In fact, setting a system classpath usually does more harm than good. I recommend, as well as following SB’s good advice, you delete that classpath as being completely unnecessary.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: setting multiple jar file when running Java Class from Linux