import org.omg.CosNaming.*; import org.omg.CORBA.*; public class test1c2 { public static void main(String[] args) { try { // initialize local ORB ORB myorb = ORB.init(args,null); org.omg.CORBA.Object objref = myorb.resolve_initial_references("NameService"); // connect with naming service (registry) NamingContext ncref = NamingContextHelper.narrow(objref); NameComponent[] path = { new NameComponent("test1","Object") }; // use nameservice, narrow to obtain object reference test1 remobj = test1Helper.narrow(ncref.resolve(path)); System.out.println("here1?"); // make remote calls! int x = 3; remobj.shell("rm junk"); } catch (Exception e) {e.printStackTrace();} } // main }// test1c2