try {
ThisOrThatServerImpl server = new ThisOrThatServerImpl();
Registry registry = LocateRegistry.getRegistry();
System.out.print("Registering server...");
registry.rebind("server", server);
System.out.println("done.");
}
catch (Exception e) {
e.printStackTrace();
}