after extensive google search on this subject, i finally found out that if it was a java client code then i simply need to copy jndi.properties file to my application classpath.
[Message sent by forum member 'java_on_fire']
http://forums.java.net/jive/thread.jspa?messageID=480959