• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to include jars inside other jars?  RSS feed

 
Alejandro Pedraza
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

I'm trying to make a jar for a desktop app, that contains itself a lib dir with other jars. I read in Sun's jar tutorial that I can't include those jars in the manifest's classpath, and that I must instead "write custom code to load those classes". This sounds a little inconvenient. What's the usual approach?

Thanks,
Alejandro
 
Paul Clapham
Sheriff
Posts: 22506
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The usual approach is to not include jars inside other jars. Instead you leave all the jars as separate files and include the secondary jars in the class-path part of the primary jar's manifest.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at http://one-jar.sourceforge.net/
 
Alejandro Pedraza
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok thanks, I was thinking things would work like in a web container, but now I can see why that doesn't make much sense in the desktop.

Cheers,
Alejandro
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!