【发布时间】:2019-03-09 05:22:57
【问题描述】:
我正在使用基于 com.sun.jndi.fscontext.RefFSContextFactory 文件的 JNDI 上下文工厂。好像拿了java应用程序启动的地方的驱动。
Hashtable properties = new Hashtable(2);
properties.put(Context.PROVIDER_URL,"file:///tmp/jms/mycontext");
properties.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscontext.RefFSContextFactory");
InitialContext ctx = new InitialContext(properties);
如何指定驱动器号,例如 d:/tmp/jms/mycontext ?
使用file://d:/tmp/jms/mycontext 似乎仍然会转到我系统上的c 盘
【问题讨论】:
标签: java windows jms jndi initial-context