Search code examples
javajarapache-commons-io

What are the different jar files for in Java, and how to import them into Eclipse?


I just downloaded the commons-io-2.4-bin.zip and I am going to import org.apache.commons.io.FileUtils; and I plan to add the jars in eclipse (project->properties->Libraries->add external jars). I know that the -javadoc.jar must contain the documentation for the commons-io library and that the -sources.java must have the source files. But I still have questions regarding what I am doing.

  1. Am I including the jar files best way in eclipse
  2. What are the -tests.jar and -test-sources.jar files?

Solution

    1. You should add the .jar file that doesn't have any suffixes to the build path.

    2. Those contain unit tests (and source code for unit tests)