Basic HTML version of Foils prepared 3 Feb 98

Foil 13 Main method: Create an instance and install a Security Manager

From Overview of Distributed Objects and RMI in Java 1.1 ARL Database Tutorial and CPS616 -- February 98. by Nancy McCracken


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 }



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Nov 29 1998