下面是我的测试类类
Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
env.put(Context.PROVIDER_URL,  "jnp://localhost:1099");
Context enc;
try {
enc = new InitialContext(env);
// HelloBeanRemote remote = (HelloBeanRemote) enc.lookup("HelloBean/remote");
HelloBeanLocal local = (HelloBeanLocal) enc.lookup("HelloBean/local");
// System.out.println(remote.toString());
// System.out.println(remote.sayHello());    //远程调用可以成功
if(local==null){                          //为什么这是false
System.out.println("local null");
}else{
System.out.println(local.toString());//这一行提示空指针
}