Main method: Create an instance and install a Security Manager
This method will call the constructor of the class to create an instance.
It will also install a security manager to make sure that any calls initiated by a remote client will not perform any “sensitive” operations, such as loading local classes.public static void main (String args [ ]){System.setSecurityManager (new RMISecurityManager()); try { HelloImpl obj = new HelloImpl(“HelloServer”); . . . // name registry code goes here } catch (Exception e) { . . . } // code to print exception message}