public static void main(String args[]) {
        try {
        	Registry registry = LocateRegistry.getRegistry(args[0]);
        	TheInterface remoteObject = (TheInterface) registry.lookup("TheServer");
			
        	String testType = args[1];
        	if("talk".equalsIgnoreCase(testType)){
        	    talk(args, remoteObject);
        	} else if("ref".equalsIgnoreCase(testType)){
        	    testReferences(args, remoteObject);
        	} else if("ref2".equalsIgnoreCase(testType)){
        	    testReferencesFromClientToServer(remoteObject);
        	} else if("val".equalsIgnoreCase(testType)){
        	    testPassingByValue(remoteObject);
        	}


        } catch (Exception e) {
        	e.printStackTrace();
        }
    }