另外,我在网上看到其他人用 JNDI 连接 DataSource 时,经常用到
com.sun.jndi.fscontext.RefFSContextFactory
我的测试程序如下:public class test01
{
public static void main(String[] args)
{
try
{
Properties pros = new Properties();
pros.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.fscontext.RefFSContextFactory");
         Context ctx = new InitialContext(pros);
catch(Exception e)
{
System.out.println("Exception : " + e.getMessage());
System.out.println("Type : " + e.getClass().toString());
}
}结果出现错误:
Exception : Cannot instantiate class: com.sun.jndi.fscontext.RefFSContextFactory
Type : class javax.naming.NoInitialContextException为什么会找不到 RefFSContextFactory 这个类呢?
它是在哪个包里的?我怎么找不到啊
是在 j2se 里还是 j2ee 里?