If I set the
java.naming.factory.initial and
java.naming.provider.url properties in
jndi.properties file, everything works fine.
But if I specify it in my program using the following code,
javax.naming.NoInitialContextException is thrown!
Setting the properties in command line (
java -D option) also doesn't work.
What might be the problem?