Hi all,
I asked this question in the past, and came to the conclusion that there's no simple way to do this. I've posted this as a RFE on Sun's Java site, so if you're interested... vote for it! :-) http://developer.java.sun.com/developer/bugParade/bugs/4648386.html My current solution is to deploy applications in a zip file like this: [ZIP] | +--appli.jar | +--lib/ | | | +--abc.jar | | | +--def.jar | | | +--ghi.jar | +--appli.bat | +--appli.sh ...where "appli.jar" contains a manifest with a "Main-Class:" attribute pointing to some class in "appli.jar", and the other jars are referred to from the "Class-Path:" attribute in "appli.jar"'s manifest too (values such as "lib/abc.jar"). Just to make it perfectly clear, I didn't embed the other jars inside each other: they're available close to each other on-disk (after unzipping). The "bat" and "sh" files contain lines such as: java -jar appli.jar <params> ...because sometimes such a line is impractical or difficult for users to understand. The other workaround is to use a custom classloader, but you really to have a good reason to go to such trouble... (IMHO). -Chris B. ----- Original Message ----- From: "Diane Holt" <[EMAIL PROTECTED]> To: "Ant Users List" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, March 13, 2002 1:43 AM Subject: Re: Using Main-Class and Class-Path in a manifest file > --- Todd Wilson <[EMAIL PROTECTED]> wrote: > > It's not an absolute necessity for us to include everything in a single > > jar file, but it is a convenience. > > Would there be a problem with sticking the individual log4j files into > your jar (as opposed to putting them in as a jar themselves)? If you did > that then it should work (right?), and you'd still have a single jar file. > > Diane > > ===== > ([EMAIL PROTECTED]) > > > > __________________________________________________ > Do You Yahoo!? > Try FREE Yahoo! Mail - the world's greatest free email! > http://mail.yahoo.com/ > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>