Bundle 2 standalone jars into 1

一笑奈何 提交于 2020-01-06 14:07:52

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!