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