我正在尝试从远程位置读取烟雾,我的代码是:
public Smooks createSmooks() throws Exception {
Smooks smooks = new Smooks("\\\\qa01\\conf\\order\\realec\\outbound.xml");
return smooks;
}
但它给出了以下例外:
java.io.IOException: Failed to access data stream for resource
[qa01/conf/order/realec/outbound.xml]. Tried filesystem, classpath and URL.
以前,这些文件放在 jar 中。所以我以这样的方式阅读它没有任何问题:
public Smooks createSmooks() {
Smooks smooks = new Smooks("./conf/order/realec/outbound.xml");
return smooks;
}
你能帮我为放置在某个远程位置的文件创建 smooks 对象吗?