Making jar by hand, with dep
1 minute read
I happened to have problem running a jar with dependencies, and I found my-self wondering: Do I really know how it works?
I don’t remember having ever done it manually, so I tried. It is a good thing to be sure of what we know. Here is the code, lets two classes A and B. A’s got the main and requires B:
Now, let’s compile everything
Finally, move A.jar and run it
Output: B says: Hello world
Conclusion, it is just as expected but now at least I’m sure of it :-)