Search code examples
javaapachejarapache-commons

Can't import Apache Commons Jars


I'm trying to add the apache commons jar extensions to my project I copied my jar files in my project root. I also put these same files in my "Referenced Libraries" folder and when I run my app I'm getting the below error message.

To add the jars this is my process I right-click>Properties>Java Build Path>Libraries>Add Jars

My error message Caused by: java.lang.NoClassDefFoundError: org.apache.commons.io.IOUtils


Solution

  • You are maybe missing a jar, try adding this jar to the classpath by doing just what you did before:

    right-click>Properties>Java Build Path>Libraries>Add Jars

    Download this JAR: http://central.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.jar