views:

67

answers:

4

My java code uses log4j eg. it tries to import org.apache.log4j.logger , import org.apache.commons.lang.StringUtils, import org.testng.Assert and many more Is there any common place where i can get them? And also how to configure them too. I downloaded the log4j from apache site but could not configure it properly. Any help will be appreciated!

Regards, Multicoder

+1  A: 

Hi there - you will kick yourself in a second as the answer is in the question!

To get more information about the org.apache.commons library you need to go to:

http://commons.apache.org/

-- UPDATE --

Re-reading your question I think you were actually asking about org.testng which you can find at:

http://testng.org

Grouchal
A: 

add log4j.jar in your classpath

dfa
A: 

this is where i put the extracted files C:\Program Files\Java\apache-log4j-1.2.15 i.e. inside the java's installtion and gave the classpath as C:\Program Files\Java\apache-log4j-1.2.15\log4j-1.2.15.jar in the existing classpath along with C:\Program Files\Java\jdk1.6.0_14\lib; so I made the classpath as C:\Program Files\Java\jdk1.6.0_14\lib;C:\Program Files\Java\apache-log4j-1.2.15\log4j-1.2.15.jar; like this also. Also tried creating the CLASSPATH as a seperate environment variable(i noted its in a capital letter!) and giving the C:\Program Files\Java\apache-log4j-1.2.15\log4j-1.2.15.jar; value to it. But neither of the approaches worked so far...

A: 

If you are not using Maven to automatically download them, you can get them manually from Maven repo. This is a trusted source of jars besides the original project site.

rodrigoap