Dominique Devienne wrote:

> No need for parsing! Don't know about ClassLoader#getResources??? --DD

I meant "open the jar, read the entry". That requires a jar to exist - if
you want to package multiple libs in a jar, you need to merge the
descriptors ( will this allow multiple namespaces ? )

Some people consider even getRealPath() to be a bad thing because you access
the file system directly ( I disagree - but they have some points ).

Regarding getResources() - you can use it to get all META-INF/antlib.xml
that are visible in a certain loader. For example if you want to load all
the libraries. Again, using the filesystem directly is not perfect.

Costin



> 
>> -----Original Message-----
>> From: Costin Manolache [mailto:[EMAIL PROTECTED]
>>
>> I don't like passing the .jar very much - but that's probably the only
>> way if we want to use META-INF/antlib.xml.
>> 
>> The alternative would be to use /net/sf/antcontrib/antlib.xml (i.e.
>> descriptor in a package ), and use "antlib:net.sf.antcontrib" as
>> namespace.
>> Then getResource() can be used, and we don't have to worry about
>> multiple jars providing META-INF/antlib.xml - which forces us to use the
>> .jar file directly.


Reply via email to