Can anyone explain in what case does new InitialContext() throw NamingException.
I read java docs and it us mentioned that this exception is thrown when a naming exception is encountered. But I don't understand why will a naming exception occur while initializing the context. I mean, I am not looking a name while initialing, so why will this exception occur when initializing it?