This content has been marked as final. Show 2 replies
Your problem starts with the title. You don't 'connect to' JNDI, you use JNDI to 'connect to' naming services. There is no such thing as a JNDI server.
So, first question, what naming service are you trying to connect to?
The answer to that determines what goes in the env.put() calls. Then you need to pass that environment to the initial context. Then you need to use / not \ in the name string. Then you need to take whatever steps are required to ensure that whatever you are looking for by that name has been bound in the naming service with that name.