예제 #1
0
 static int atoi(String a) {
   int i = 0;
   try {
     i = Integer.parseInt(a);
   } catch (Exception ex) {
     ex.printStackTrace();
   }
   return i;
 }
예제 #2
0
  public static void main(String[] args) {
    int type = USE_NEWT;
    String tstName = "demos.es2.perftst.PerfVBOLoad"; // default

    for (int i = args.length - 1; i >= 0; i--) {
      if (args[i].equals("-awt")) {
        type |= USE_AWT;
      }
      if (args[i].equals("-test") && i + 1 < args.length) {
        tstName = args[i + 1];
      }
    }

    try {
      PerfModule pmod = (PerfModule) Class.forName(tstName).newInstance();
      new Perftst().run(type, pmod);
      System.exit(0);
    } catch (Exception e) {
      e.printStackTrace();
      System.exit(1);
    }
  }