// Create and install the security manager
System.setSecurityManager(new RMISecurityManager());
try {
HelloImpl obj = new HelloImpl("HelloServer");
Naming.rebind("HelloServer", obj);
System.out.println("HelloImpl created and bound in the registry to the name HelloServer");
} catch (Exception e) {
System.out.println("HelloImpl.main: an exception occurred:");
e.printStackTrace();
}