ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: Using the new -i flag
Date Mon, 05 Apr 2004 22:34:10 GMT
> From: Thomas SMETS []
> My problem is rather trivial, though I am currently stucked.

Actually it's not.

> I would like to have my business code to be wrapped up in a JAR.
> Within the JAR I would like to include some libraries (namely Log4J.jar)
> The Jar content would therefore be something like this :
> ~                    my/com/code/class1.class
> ...
> ~                    my/com/code/class8.class
> ~                    META-INF/MANIFEST.MF
> ~                    lib/log4j.jar
> I could not published the fact that the log4.jar was part of my
> "Business.jar" & therefore visible to any application using my
> "Business.jar".

This is not possible using the JDK only. There is an OpenSource tool called
ClassWorlds that allows to do things like that, and maybe others (like
JBoss?), but I've never encountered their use.

WebApps are packaged like that (in an ear, right!?), but the container
expands the ear/jar upon deployment, so the JARs within the JAR are not used
directly from within the JAR.

There's also a jarx: custom URL protocol out there (somewhere) that allows
accessing JARs within JAR using standard URLs, thus hooking up to a regular
JDK URLClassLoader, but again I've not used it either.

I don't recommend trying to do something like that unless one understands
very thoroughly class loading. Or simply expand your pseudo JAR before it's
used ;-)

> Any hint on how to use the -i flag in the jarification process ... ?

You mean to create a JAR index??? --DD

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message