/* * * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved. * * This software is the proprietary information of Sun Microsystems, Inc. * Use is subject to license terms. * */ import java.util.*; import javax.naming.Context; import javax.naming.InitialContext; import javax.rmi.PortableRemoteObject; public class ShipperClient { public static void main(String[] args) { try { Context initial = new InitialContext(); Object objref = initial.lookup("MyShipper"); ShipperHome home = (ShipperHome)PortableRemoteObject.narrow(objref, ShipperHome.class); Shipper shipper = home.create("Helena"); shipper.shipItem("123", 9); shipper.remove(); } catch (Exception ex) { System.err.println("Caught an unexpected exception!"); ex.printStackTrace(); } } }