import org.omg.CosNaming.*; import org.omg.CORBA.*; import kirje.*; public class kirjeServer{ public static void main(String argumendid[]) throws Exception{ ORB orb=ORB.init(argumendid, null); inimandmedImpl impl=new inimandmedImpl(); orb.connect(impl); NamingContext namingContext=NamingContextHelper.narrow( orb.resolve_initial_references("NameService") ); NameComponent[] path={new NameComponent("kirje", "Object")}; namingContext.rebind(path, impl); System.in.read(); } }