Hi,
I wrote this code as is from the JNDI tutorial from sun website. But I am getting this exception while running it:
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import java.util.*;
/**
* Write a description of class FirstJndi here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class FirstJndi
{
public static void main(String[] args) {
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscontext.RefFSContextFatory");
try {
Context ctx = new InitialContext(env);
Object obj = ctx.lookup(args[0]);
} catch (NamingException e) {
e.printStackTrace();
}
}
}
Can anyone help me with this? I would really appreciate this very much. Thanks in advance.