public static void main(String[] args) {
        if (args.length < 1) {
            System.err.println("usage: invoke [-h <connectspec>] <method> [arguments]");
            System.err.println("    Connectspec: This is on the form hostname:port, or tcp/hostname:port");
            System.err.println("                 if omitted, localhost:8086 is used");
            System.err.println("    Arguments: each argument must be a string or on the form <type>:<value>");
            System.err.println("    supported types: {'b','h','i','l','f','d','s'}");
            System.exit(0);
        }
        List<String> arguments = new ArrayList<String>(List.of(args));
        String connectSpec = "localhost:8086";
        if ("-h".equals(arguments.get(0)) && arguments.size() >= 3) {
            arguments.remove(0);             // Consume -h
            connectSpec = arguments.remove(0);
        }
        String method = arguments.remove(0);
        new RpcInvoker().invoke(connectSpec, method, arguments);
    }
Invokes a rpc method without throwing an exception

@param connectspec the rpc server connection spec
@param method the name of the method to invoke
@param arguments the argument to the method, or null or an empty list if there are no arguments
jrt/src/com/yahoo/jrt/tool/RpcInvoker.java