public JkMain getJkMain() {
   if (jkMain == null) {
     jkMain = new JkMain();
     jkMain.setWorkerEnv(wEnv);
   }
   return jkMain;
 }
Exemple #2
0
  public static void main(String args[]) {
    try {
      if (args.length == 1 && ("-?".equals(args[0]) || "-h".equals(args[0]))) {
        System.out.println("Usage: ");
        System.out.println("  JkMain [args]");
        System.out.println();
        System.out.println("  Each bean setter corresponds to an arg ( like -debug 10 )");
        System.out.println("  System properties:");
        System.out.println("    jk2.home    Base dir of jk2");
        return;
      }

      jkMain = new JkMain();

      IntrospectionUtils.processArgs(jkMain, args, new String[] {}, null, new Hashtable());

      jkMain.init();
      jkMain.start();
    } catch (Exception ex) {
      log.warn("Error running", ex);
    }
  }