This is a compilation of common usage doubts, tips and workarounds.
Simlpy pass "" to the ResourceUtils.getPackageResources(String) method. The method will get the resources associated to the path from where the app is being executed.
Here's an example:
... try { Enumeration<URL> resources = ResourceUtils.getPackageResources(""); // more code here } catch (ResourceNotFoundException resourceNotFoundException) { // Exception-handling code... } ...
Declare a null array of Class objects and pass it to the instantiateObjectFromClass(Constructor<T>, Object[]) method.
See the topic on instantiation from constructors on the Reflection Utilites user guide section for a detailed code example.
The first thing to do is to check if the folder name contains any punctuation or symbolic characters or spaces. The library methods that deal with folders have been found to misbehave with this kind of names. The only workaround is to eliminate such characters from the folder name. Example:
C:\a[v]ery(o)dd{f}older name\subfolder
The 'subfolder' will not be found by the library. But all will work correctly if you change the folder name to:
C:\averyoddfoldername\subfolder