Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Java

Shane McC
Shane McC
3,005 Points

Can't import Apache Commons Jars

Hi

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

1 Answer

Jonathan Petersen
Jonathan Petersen
45,548 Points

What IDE and/or build tools are you using?

Shane McC
Shane McC
3,005 Points

Eclipse with ADT

Jonathan Petersen
Jonathan Petersen
45,548 Points

Try refreshing the project and then do a clean. I use Netbeans with Gradle and you have to refresh and clean to detect and include new dependencies.