pr.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.registry.RegistryContextFactory");
pr.put(Context.PROVIDER_URL, "rmi://" + serverAddress + ":" + regServerPort);
InitialContext ic = new InitialContext(pr);
Object objRef = ic.lookup("AuthServer");
Bootstrap bootstrap = (Bootstrap)PortableRemoteObject.narrow(objRef, Bootstrap.class);
Runnable client = bootstrap.getClient();
client.run();
}
catch (Exception e) {
e.printStackTrace();
}