code: public synchronized Registry getRegistry() throws RemoteException {
      if (registry == null) {
        registry = LocateRegistry.createRegistry(JdcpUtil.DEFAULT_PORT);
      }
      return registry;
    }
docs: Gets the RMI <code>Registry</code> to register the server with, creating
  it if necessary.
  @return The RMI <code>Registry</code> to register the server with.
  @throws RemoteException If an error occurs while attempting to create
  the <code>Registry</code>.