能否详细将你的问题说清楚!

解决方案 »

  1.   

    也就是说:以jbuilder为开发工具,用websphere Application server single server4作为应用服务器,开发jndi程序,想要访问文件系统,参考代码如下:
    Properties env = new Properties();
    env = System.getProperties();
    env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.fscontext.RefFSContextFactory");
    env.put(javax.naming.Context.PROVIDER_URL,"file:c:\\");
    ctx = new InitialContext(env);//System.getProperties();
    出现错误:
    avax.naming.NoInitialContextException: Cannot instantiate class: com.sun.jndi.fscontext.RefFSContextFactory.  Root exception is java.lang.ClassNotFoundException: com.sun.jndi.fscontext.RefFSContextFactory
    但是用BES5作为应用服务器却没有这个问题,我应该怎么办