static class JavaXClassLoaderWithParent extends JavaXClassLoader {
  ClassLoader virtualParent;

  *(S progID, L<File> files, ClassLoader virtualParent) {
    super(progID, files);
    this.virtualParent = virtualParent;
  }
  
  protected Class<?> findClass(S name) throws ClassNotFoundException {
    if (virtualParent != null && !eq(name, "main") && !name.startsWith("main$")) {
      try {
        ret virtualParent.loadClass(name);
      } catch ClassNotFoundException e {}
    }
    ret super.findClass(name);
  }
  
  public URL findResource(S name) {
    if (virtualParent != null) {
      URL url = virtualParent.getResource(name);
      if (url != null) ret url;
    }
    ret super.findResource(name);
  }
  
  ClassLoader getVirtualParent() { ret virtualParent; }
}