When I run \"clean and build\" the .jar file that is being created only runs if the lib folder is at the same folder of the .jar file.
I solved this by creating just one jar file with all libraries inside, adding the following to my build.xml file in NetBeans:
This creates a jar file (Combined-dist.jar) which is the combination of the dist jar and the specified library jars (in this case, commons-io-1.4.jar,ninja-utils-3.2.jar and unicorn-1.0.jar). You have to be sure to specify your Main Class package for the new jar file or it won't run when you try to open it.