code: static ClassLoader getClassLoader ()
      {
          Method m = null;
  
          try {
              m = Thread.class.getMethod("getContextClassLoader");
          } catch (NoSuchMethodException e) {
              // Assume that we are running JDK 1.1, use the current ClassLoader
              return NewInstance.class.getClassLoader();
          }
  
          try {
              return (ClassLoader) m.invoke(Thread.currentThread());
          } catch (IllegalAccessException e) {
              // assert(false)
              throw new UnknownError(e.getMessage());
          } catch (InvocationTargetException e) {
              // assert(e.getTargetException() instanceof SecurityException)
              throw new UnknownError(e.getMessage());
          }
      }
docs: Figure out which ClassLoader to use.  For JDK 1.2 and later use
  the context ClassLoader.