⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 keyclient.java

📁 corba是一款商用内存检测工具
💻 JAVA
字号:
/*
 * KeyClient.java
 *
 * Created on 2008年5月4日, 下午9:34
 *
 */

/**
 *
 * @author xzh
 */
import org.omg.PortableServer.*;
public class KeyClient {
/** Creates a new instance of KeyClient */
    public KeyClient() {
    }
    public static void main(String[] args) {
        org.omg.CORBA.ORB _orb;
        ManageKey localManageKey;
        String name = "ManageKey";
        try
        {
            if (System.getProperties().get("ORBagentPort") == null) {
                System.getProperties().put("vbroker.agent.port", "14000");
            }
            if (System.getProperties().get("ORBagentAddr") == null) {
                System.getProperties().put("vbroker.agent.addr", "localhost");
            }
            if (System.getProperties().get("org.omg.CORBA.ORBClass") == null)
            {
                System.getProperties().put("org.omg.CORBA.ORBClass",
                                   "com.inprise.vbroker.orb.ORB");
            }
            if (System.getProperties().get("org.omg.CORBA.ORBSingletonClass")
                == null) {
                System.getProperties().put("org.omg.CORBA.ORBSingletonClass",
                                   "com.inprise.vbroker.orb.ORB");
            }
            _orb = org.omg.CORBA.ORB.init(args, System.getProperties());
            localManageKey = ManageKeyHelper.bind(_orb,
            "/manage_key_poa", name.getBytes());
            System.out.println(localManageKey.GetKey());
            localManageKey.SetKey("RealKey");
        }
        catch (org.omg.CORBA.OBJECT_NOT_EXIST cone) {
            System.out.println(cone.getMessage());
        }
        catch (Exception e) {
            e.printStackTrace();
        }        
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -