import java.io.*;
import java.lang.reflect.*;

class Frame {

public static void main(String[] args) {
  for(int i=0; i<args.length; i++) {
    try {
      Class c=Class.forName(args[i]); // Klasse laden
      System.out.println(c);
      Method[] l=c.getMethods();

      final Method method=c.getMethod("main",
        new Class[] {
         new String[0].getClass()
        } ); // muß dort public sein!

      new Thread(args[i]) {
        public void run() {
          try {
            method.invoke(null,new Object[] { new String[0] });
          } catch(IllegalAccessException e) {
            e.printStackTrace();
          } catch(InvocationTargetException e) {
            e.printStackTrace();
          }
        }
      }.start();
    }
    catch(ClassNotFoundException e) {
      e.printStackTrace();
    }
    catch(NoSuchMethodException e) {
      e.printStackTrace();
    }
  }
}

}
