//*** Remote class loader with stubs for security //*** As we're doing no security, I've stubbed the // checkSecurity method for now. import java.net.URL; import java.net.URLClassLoader; public class RemoteClassLoader extends URLClassLoader { public RemoteClassLoader(URL[ ] urls) { super(urls); } // Override of URLClassLoader.loadClass(String name) public Class loadClass(String name) throws ClassNotFoundException { //*** checkSecurity(name); return super.loadClass(name); } // Overload, not override: define a class from a byte array public Class loadClass(String name, byte[ ] bytes) throws ClassNotFoundException { //*** checkSecurity(name); return defineClass(name, bytes, 0, bytes.length); } protected void checkSecurity(String name) { //*** for now, a stub } }