LocalRegistry java rebind() java8

Java
String name = "Greeting";
Registry registry = LocateRegistry.getRegistry(port);
registry.rebind(name, stub);

Source

Also in Java: