/**
 * 
 * Virtual Machine in Java
 * 
 * Compile to machine code
 *
 * @author Matthew W. Coan
 * @version Fri Nov 23 21:51:01 EST 2012
 *
 */
import java.io.*;
import java.util.*;
import java.lang.reflect.*;

public class vm implements Runnable {
   private String class_name = new String();

   public vm(String class_name) {
      this.class_name = class_name;
   }

   public void run() {
      try {
         Class the_class = Class.forName(class_name);
         Method the_method = the_class.getMethod("run");
         Object the_obj = (Object)the_class.newInstance();
         the_method.invoke(the_obj);
      }
      catch(Exception ex) {
         //ex.printStackTrace(System.err);
         //System.exit(1);
      }
   }

   public static void main(String args[]) {
      try {
         new vm(args[0]).run();
      }
      catch(Exception ex) {
          //ex.printStackTrace(System.err);
          //System.exit(1);
          //hSystem.err.println("System error...");
      }
   }
}
