客户端主要代码为:
try{
Hashtable ht = new Hashtable();
ht.put(InitialContext.PROVIDER_URL, "jnp:\\localhost:1099" );
ht.put(InitialContext.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
Context cn1=new InitialContext(ht);
HelloHome he=(HelloHome)PortableRemoteObject.narrow(cn1.lookup("HelloWorldHome"),HelloHome.class);
try{
Hashtable ht = new Hashtable();
ht.put(InitialContext.PROVIDER_URL, "jnp:\\localhost:1099" );
ht.put(InitialContext.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
Context cn1=new InitialContext(ht);
HelloHome he=(HelloHome)PortableRemoteObject.narrow(cn1.lookup("HelloWorldHome"),HelloHome.class);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货