Dynamic Loading Path

Say I wanted to create a "Package Explorer" that could be pointed to any valid codebase type folder on my machine and it would load and display all the classes in those folders. How do I tell the class loader where to look, or to load a specific file? Here's what I've tried so far...

System.setProperty("java.class.path","c:\\folder");

Class c = Class.forName("package.MyClass");

ClassLoader myLoader =new URLClassLoader(new URL[]{new URL("c:\\folder")});

Class c = Class.forName("package.MyClass",false,myLoader);

This of course should go to c:\folder\package\MyClass.class and load it. Any help doing what I'm trying to do here?

[953 byte] By [millea311a] at [2007-10-2 21:32:44]
# 1
The first won't work. The VM doesn't use that property. It is there for your inspection not modification.As for the second class loaders load classes not directories. You need to create your own class loader and have it load the files in the passed in directory.
jschella at 2007-7-14 0:46:17 > top of Java-index,Core,Core APIs...