J. Arenas
J. Arenas

Reputation: 493

How to add a jar library into another jar library

i am doing a java library that is using jaybird jar. I want my library to be a jar with the jaybird in it so when I have to use it, I only import my jar.

How can this be done? I'm using Eclipse Version: Indigo Service Release 2.

Thanks in advance!

Upvotes: 2

Views: 125

Answers (1)

JB Nizet
JB Nizet

Reputation: 692121

It can be done, but requires a special launcher using a specific classloader to extract the inner jar from the outer jar.

I would simply use the standard way of doing: deliver both jars, along with a startup .bat/.sh file used to start the application, the whole being packed into a simple zip file.

Upvotes: 2

Related Questions