On Wed, 22 Sep 2004 11:50:52 -0500, EjP wrote:
> ..How about advice on
> the quickest way to load all the classes in a particular
> directory?
URL theDir = this.getClass().getResource("/");
File f = new File( url.getFile() );
f.listFiles( new ClassFilter() );
....
class ClassFilter extends FileFilter {
boolean accept(File f) {
return f.getName().toLowerCase().endsWith(".class");
}
}
( quickly, of course..
BTW, please keep your posts to c.l.j.help for the moment
EjP, it is not generally a good idea to x-post between
c.l.j.help and c.l.j.programmer.
** F'Ups set to c.l.j.help **
HTH
--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.lensescapes.com/ Images that escape the mundane