public static void main(String[] args)
   {
      final int argsLength = args.length;
      if (argsLength < 1)
      {
         usage();
         System.exit(OTHER);
      }
      String rarFile = "";
      String[] cps = null;
      boolean stdout = false;
      String reportFile = "";

      for (int i = 0; i < argsLength; i++)
      {
         String arg = args[i];
         if (arg.equals(ARGS_CP))
         {
            cps = args[++i].split(System.getProperty("path.separator"));
         }
         else if (arg.equals(ARGS_STDOUT))
         {
            stdout = true;
         }
         else if (arg.equals(ARGS_OUT))
         {
            reportFile = args[++i];
         }
         else if (arg.endsWith("rar"))
         {
            rarFile = arg;
         }
         else
         {
            usage();
            System.exit(OTHER);
         }
      }
      int exitCode = rarInfo(rarFile, cps, stdout, reportFile);
      if (exitCode == SUCCESS)
      {
         System.out.println("Done.");
      }
      System.exit(exitCode);
   }
public static void main ( String [ ] args ) { final int argsLength = args . length ; if ( argsLength < 1 ) { usage ( ) ; System . exit ( OTHER ) ; } String rarFile = "" ; String [ ] cps = null ; boolean stdout = false ; String reportFile = "" ; for ( int i = 0 ; i < argsLength ; i ++ ) { String arg = args [ i ] ; if ( arg . equals ( ARGS_CP ) ) { cps = args [ ++ i ] . split ( System . getProperty ( "path.separator" ) ) ; } else if ( arg . equals ( ARGS_STDOUT ) ) { stdout = true ; } else if ( arg . equals ( ARGS_OUT ) ) { reportFile = args [ ++ i ] ; } else if ( arg . endsWith ( "rar" ) ) { rarFile = arg ; } else { usage ( ) ; System . exit ( OTHER ) ; } } int exitCode = rarInfo ( rarFile , cps , stdout , reportFile ) ; if ( exitCode == SUCCESS ) { System . out . println ( "Done." ) ; } System . exit ( exitCode ) ; }
Main
@param args args