I am using Eclipse.
I wrote a little Java Gui Tool that depends on the jnetpcap libary which is included in my eclipse project. On my disk the library is placed in a differenct directory than the project.
I want to build a jar (export-> jar) to have it run on other computers, but I did not find out how to “include” the jar file.
I don’t mind if it’s merged into one file or the library is shipped separately. I just don’t know what to configure and where, to have a complete build of that dependency.
There’s no out-of the box way to do this, but there are tools that provide jar dependency inclusion.
Jarjar and one-jar come to mind. Both provide ant tasks and the latter has a maven plugin.
If you’re using eclipse, when creating executable jar the dependencies get included automatically AFAIK.