According to the discussion on the developer mailing list
I need to change the classloader used by the
Currently the classloader with which the
PackageObjectFactory class itself was loaded is used
as well to load the modules.
I want to provide a feature for the eclipse-cs plugin that
allows the user to just drop in his custom jar in a specific
The plugin will then automatically discover these custom
libraries - so no addtional configuration inside the plugin
needs to be done.
The easiest solution occurring to me was if the
PackageObjectFactory would use the contextclassloader
of the current thread (Thread.currentThread().
getContextClassLoader) to load the modules.
This way I only need to change this context classloader
before configuring a checker - and all custom modules
will be found.
No additional API would be needed with this aproach.