private static boolean hasCommandLineArguments(final String[] args) {
    if (hasServer(args)) {
      if (args.length < 2) {
        throw new IllegalStateException("-server param but no value");
      }

      return args.length > 2;
    }

    return args.length > 0;
  }
@param args the arguments to check for command-line arguments
@return True if command-line arguments were passed.
hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKMainServer.java