// Determine the URL to this .class file, so that we can then
// append the priority dirs to it. For tidiness, load this
// class through a dummy loader though this is not absolutely
// necessary...
PathableClassLoader dummy = new PathableClassLoader(null);
dummy.useExplicitLoader("junit.", Test.class.getClassLoader());
dummy.addLogicalLib("testclasses");
dummy.addLogicalLib("commons-logging");
String thisClassPath = thisClass.getName().replace('.', '/') + ".class";
URL baseUrl = dummy.findResource(thisClassPath);