netbeans: creating a jar including jar libraries
I am trying to create a jar of my netbeans project which includes some other jars as libraries.
The problem is that it compiles ok and creates the jar but unfortunately it does not include in the project .jar the libraries needed for the execution.
Therefore when I run the program it complains with a java.lang.NoClassDefFoundError.
I should also say that my program does not have a main method since it is a package that will be loaded dynamically by another program. For this reason Netbeans does not create the /lib folder in the /dist folder, but even if it did I would have liked to avoid to copy the /lib folder over.
Is it any way to tell netbeans to include the libraries within the .jar file?
Anyone can advise on how I can solve this?