SimpleJNDIServer.println("Cannot find NamingBeanImpl: must be running jdk 1.4");
}
String host = InetAddress.getLocalHost().getHostAddress();
Main jserver = new Main();
if (namingBean != null)
{
Class namingBeanClass = Class.forName("org.jnp.server.NamingBean");
Method setNamingInfoMethod = jserver.getClass().getMethod("setNamingInfo", new Class[] {namingBeanClass});
setNamingInfoMethod.invoke(jserver, new Object[] {namingBean});
}
int port = JNDI_PORT;
jserver.setPort(port);
jserver.setBindAddress(host);
jserver.setRmiPort(31000);
jserver.start();
System.out.println("Started JNDI server on " + host + ":" + port);
while (true)
{
Thread.sleep(5000);