ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Cheesman <>
Subject RE: Jar file loading
Date Wed, 23 May 2001 15:34:58 GMT
At 04:29 PM 23/05/01, you wrote:
> > Still, if anyone needs a couple of utilities to trace down
> > where a class is being loaded from, I'm happy to share. (One's even
> > defined as an ant task! ;)
>I've come into this discussion late, but I thought I'd chip in one small
>contribution, if people don't want to download whole full utilities - a
>tiny little program knocked up for a usenet post:
>public class JWhich


I *knew* there was an easier way to do this!

Still, I'm including my files as they have slightly different functionality 
(and they're not exactly big!)

* java jim.utilities.[Jar|Zip]FileReader <starting directory> <result file>
* Outputs to the result file all the file contents of the zip/jar files in 
and below the starting directory

* java jim.utilities.ClassFinder <fully qualified class name>
* eg java jim.utilities.ClassFinder org.xml.sax.Parser
* Finds all of org.xml.sax.Parser within jar/zip files on the classpath
* Finds all possible matches to Parser in (sub)directories on the classpath

Can be used as a task:
<taskdef name="classchk" classname="jim.utilities.ClassFinder"/>

Example (within compile target):
<target name="compile" depends="prepare">
     <classchk inputClassName="org.xml.sax.Parser" />

If anyone wants to make the inputClassName parameter above a little more 
flexible, that'd be great!

Hope they're of use to someone!

View raw message