My code compiles fine, but I’m gettting a runtime error on this line:
File myFile = new File(FilenameUtils.concat(basePath, localPath));
The error thrown is:
java.lang.NoClassDefFoundError: org/apache/commons/io/FilenameUtils
Why would the code compile if it can’t resolve a class?
Thanks for any advice.
You should add commons-io library to your runtime classpath.
http://commons.apache.org/io/
In NetBeans Project Properties Window, you click Libraries in the left panel, and in the right panel are 4 categories of classpath you can configure. You should update your Run path or make sure Compile contains commons-io library.