I'm not very experienced with Java classloaders but I think in this case if the classpath points to a jar file a class loader is automatically created and the class files the jar file encompasses are then usable. If the path doesn't point to the jar file my understanding is that a class loader would need to be created manually to load the classes and I don't know how to do that but if anyone else does I agree your solution is definitely more elegant. Also the hard coded windows path is totally incorrect I will fix with my next update.