import org.omg.CosNaming.*; import org.omg.CORBA.*; public class juhuarvKlient{ public static void main(String argumendid[]) throws Exception{ ORB orb=ORB.init(argumendid, null); juhuarvImpl impl=new juhuarvImpl(); orb.connect(impl); NamingContext namingContext=NamingContextHelper.narrow( orb.resolve_initial_references("NameService") ); NameComponent[] path={new NameComponent("juhuarv", "j")}; juhuarv j=juhuarvHelper.narrow( namingContext.resolve(path) ); System.out.println(j.uusReaalarv()+" "+j.uusTaisarv(15, 20)); } }