package examples.RMIShape; import java.rmi.*; import java.rmi.server.*; import java.util.Vector; import java.awt.Rectangle; import java.awt.Color; public class ShapeListClient{ public static void main(String args[]){ String option = "Read"; String shapeType = "Rectangle"; if(args.length > 0) option = args[0]; // read or write if(args.length > 1) shapeType = args[1]; // specify Circle, Line etc System.out.println("option = " + option + "shape = " + shapeType); if(System.getSecurityManager() == null){ System.setSecurityManager(new RMISecurityManager()); } else System.out.println("Already has a security manager, so cant set RMI SM"); ShapeList aShapeList = null; try{ aShapeList = (ShapeList) Naming.lookup("//Jean.torriano.net/ShapeList"); System.out.println("Found server"); Vector sList = aShapeList.allShapes(); System.out.println("Got vector"); if(option.equals("Read")){ for(int i=0; i