public void initORB(String[] args) throws IOException {

        Properties props = System.getProperties();
        props.setProperty("org.omg.CORBA.ORBClass", "org.jacorb.orb.ORB");
        props.setProperty("org.omg.CORBA.ORBSingletonClass", "org.jacorb.orb.ORBSingleton");

        // 启动参数
        props.setProperty("ORBInitRef.NameService", "corbaloc::localhost:30000/NameService");

        orb = org.omg.CORBA.ORB.init(args, props);
        // 获得命名服务上下文
        // 获得命名服务对象
        org.omg.CORBA.Object nsObj = null;
        try {
            nsObj = orb.resolve_initial_references("NameService");
        } catch (InvalidName e) {
            e.printStackTrace();
        }

        // 通过命名服务对象得到命名服务上下文
        NamingContextExt nc = NamingContextExtHelper.narrow(nsObj);
        // 从命名服务上下文中获得特定的命名服务对象
        org.omg.CORBA.Object svrObj = null;
        try {
            svrObj = nc.resolve_str("Simple.MyService");
        } catch (NotFound e) {
            e.printStackTrace();
        } catch (CannotProceed e) {
            e.printStackTrace();
        } catch (org.omg.CosNaming.NamingContextPackage.InvalidName e) {
            e.printStackTrace();
        }
        // 从将特定命名服务对象中获得服务接口
        MyService service = MyServiceHelper.narrow(svrObj);
        target = service;
    }