<p>How do I discover classes at runtime in the classpath which implements a defined interface?</p>

<p>ServiceLoader suits well (I think, I haven't used it), but I need do it in Java 1.5.</p>

There is no reliable way to know what classes are in the classpath. According to its
documentation
, ServiceLoader relies on external files to tell it what classes to load; you might want to do the same. The basic idea is to have a file with the name of the class(es) to load, and then use reflection to instantiate it/them.