Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Packaging multiple jars together.

807588Aug 1 2009 — edited Aug 1 2009
Hi All,
I have written a few classes (around 10-20) and put them in a jar myproduct.jar.
I am using a few open source library jars (apache commons jars to be specific).

My question is, is there any way I can combine all these jars together to create a single jar say "combined.jar" and just invoke my main class of myproduct.jar so that I do not have to put these jar files in class path every time I want to run my main class.

Also this simplifies the way I can ship the application as a single jar file.

I have tried to put all the jar files together and create a single jar, but does not seem to work.


Any pointers or idea will be great.

I am using
Win XP
JDK 1.5
Eclipse 3.3 (if it matters at all).


Thanks in advance,
Ayusman
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 29 2009
Added on Aug 1 2009
4 comments
520 views