How to combine Jars or Include dependent Jars into One Jar
698065Jun 17 2011 — edited Jun 17 2011Hello,
I have build a small utility using few libraries now i want to make a bundle or jar of this utility. I don't want to let use includes the jars individuals. I want to make a single jar using all the jars so user needs to include only one jar.
So i need to include the dependent Jar files into a single jar.
I got few solutions using Google.
Like:
adding a Class-Path: myjar.jar to MANIFESTfile.
simply update the jar with jar using commnad jar uf main.jar myjar.jar_
but these are not working. when i use the Class-Path option the Tree of main jar looks like
main.jar
<default-package>
myjar.jar
META-INF
MANIFEST.MF
How can i combine the Jars into a single Jar? Please help.