public void invoke(String connectspec, String method, List<String> arguments) {
        Supervisor supervisor = null;
        Target target = null;

        try {
            if (connectspec.indexOf('/') < 0)
                connectspec = "tcp/" + connectspec;

            supervisor = new Supervisor(new Transport("invoker"));
            target = supervisor.connect(new Spec(connectspec));
            Request request = createRequest(method,arguments);
            target.invokeSync(request, Duration.ofSeconds(10));
            if (request.isError()) {
                System.err.println("error(" + request.errorCode() + "): " + request.errorMessage());
                return;
            }
            Values returned = request.returnValues();
            for (int i = 0; i < returned.size(); i++) {
                System.out.println(returned.get(i));
            }
        }
        finally {
            if (target != null)
                target.close();
            if (supervisor != null)
                supervisor.transport().shutdown().join();
        }
    }
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