Properties properties = new Properties();
properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
properties.setProperty(Context.PROVIDER_URL, "localhost");
Context ctx = new InitialContext(properties);
......
另外记得把jboss下的jar包引到HelloClient所在的工程
properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
properties.setProperty(Context.PROVIDER_URL, "localhost");
Context ctx = new InitialContext(properties);
......
另外记得把jboss下的jar包引到HelloClient所在的工程
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货