private static void runDef(String defile, String argline) { List argx = explode(argline, ' ');
public static void runDef(String defile, String argline) { List argx = explode(argline, " ");
  private static void runDef(String defile, String argline) {    List argx = explode(argline, ' ');    int l = argx.size();    String classname = (String) argx.get(0);    List nargs = new ArrayList();    for (int i = 1; i<l; i++) {      String a = (String) argx.get(i);      // hack for old-style compatability      if (defile.endsWith(a)) {        System.err.println(defile+": skipping redundant arg "+a);      } else {        nargs.add(a);      }    }    nargs.add(defile);          // last argument is always the def file        String[] args = new String[nargs.size()];    System.arraycopy(nargs.toArray(), 0, args, 0, nargs.size());    if (true)    {      System.err.print(classname+".main([");      for (int k=0;k<args.length;k++) {        if (k!=0) System.err.print(", ");        System.err.print(args[k]);      }      System.err.println("])...");    }    // cribbed from Bootstrapper    try {      ClassLoader cl = DefRunner.class.getClassLoader();      Class realnode = cl.loadClass(classname);      Class argl[] = new Class[] { String[].class };      Method main = realnode.getMethod("main", argl);      Object[] argv = new Object[] { args };      main.invoke(null,argv);    } catch (Exception e) {      System.err.println("Failed to RunDef "+classname+": ");      e.printStackTrace();    }  }