Jdom异常java.net.MalformedURLException: unknown p...
来源:岁月联盟
时间:2012-07-07
一个以前的JDOM读入xml文件程序。之前一直运行得没有问题。
今天在运行的时候,将文件的读入源xml文件指定到中文的目录下。
突然出了下面的异常。
java.net.MalformedURLException: unknown protocol: d
读入代码
1
inDoc = inBuld.build("d://测试//InputManParseReport.xml"));
解决方法:
在文件目录前加 file:///
1
inDoc = inBuld.build("file:///d://测试//InputManParseReport.xml"));
疑问的是,为什么以前是英文路径的时候不需要加[file:///]呢?
同样都是用的决定路径啊。
作者:徐龙
上一篇:生成随机数与字母
下一篇:字符串连接 执行效率