Hi all,
I have about 10 jars and when I run my program I invoke the following:
java -Xmx1024m -cp a.jar;b.jar;c.jar;whatever.jar -Dfile.encoding=UTF-8 [package][class]
I want to make this as an executable jar. I thought that when I unjar (that sounds weird, but I’m using java command – not using general zip program) the jar containing [package][class], update manifest.mf and rejar it. Unfortunately, this did not work.
Is it possible for me to make it as an executable jar or I should unjar it and sum it all?
You just need this line in your manifest file
Then run the
jarcommand with themflag, and give it the name of your manifest file:Unfortunately, jars can’t contain other jars. Give the jar containing your entry point a
Main-Class, and then set the classpath so that the other 9 jars are accessible.