public class juhuarvServer{ 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")}; namingContext.rebind(path, impl); System.in.read(); } }