Welcome!Online Stories and Online PoetryFree SoftwareProgramming AidsAbout Gene Davisonline stories and online poems vault

com.genedavis.util.ClassLoaders

This class is for the loading of classes dynamically that are not in the class path.

Typically I use it like this. I write an interface that is not in a package. Then I write classes that extend that interface. I put them in a subfolder in the program that I'm writing. I then search that directory at runtime for any classes. I try to load them using com.genedavis.util.ClassLoaders and then try casting them to the interface type I implemented them as. If that all works, I then use them to extend the program I've written.


ClassLoaders.class
ClassLoaders.java