问题
I have 2 standalone jars (each with their own MANIFEST.MF). Is there an easy way to bundle them into a single standalone jar? I don't want to merge the 2 jars into an uber jar for instance (because of some incompatibilities).
My approach was to write a short piece of Java code which would run both jars by calling their respective 'Main-Class' in 2 separate threads. And use one-jar to bundle both jars + my short piece of code (+ one-jar's stuff). But I doubt that's the right approach.
What would be the clean way for doing this? Is that when tools like OSGi come handy?
来源:https://stackoverflow.com/questions/29394920/bundle-2-standalone-jars-into-1