01: //*** Remote class loader with stubs for security
02: //*** As we're doing no security, I've stubbed the
03: // checkSecurity method for now.
04: import java.net.URL;
05: import java.net.URLClassLoader;
06: public class RemoteClassLoader extends URLClassLoader {
07: public RemoteClassLoader(URL[ ] urls) {
08: super(urls);
09: }
10: // Override of URLClassLoader.loadClass(String name)
11: public Class loadClass(String name)
12: throws ClassNotFoundException {
13: //*** checkSecurity(name);
14: return super.loadClass(name);
15: }
16: // Overload, not override: define a class from a byte array
17: public Class loadClass(String name, byte[ ] bytes)
18: throws ClassNotFoundException {
19: //*** checkSecurity(name);
20: return defineClass(name, bytes, 0, bytes.length);
21: }
22: protected void checkSecurity(String name) {
23: //*** for now, a stub
24: }
25: }