package verteiltesysteme.rmi; import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry; public class RMIEchoClient { private RMIEchoClient() {} public static void main(String[] args) { String host = (args.length < 1) ? null : args[0]; try { Registry registry = LocateRegistry.getRegistry(host); RMIEchoInterface stub = (RMIEchoInterface) registry.lookup("RMIEchoInterface"); String response = stub.toLowerCase("hAlLo"); System.out.println("response: " + response); response = stub.toUpperCase("hAlLo"); System.out.println("response: " + response); } catch (Exception e) { System.err.println("Client exception: " + e.toString()); e.printStackTrace(); } } }