java.net.MalformedURLException: unknown protocol: e
1、当我用绝对路径时,报上面的错误,
TestXML t = new TestXML("E:/a1.html");
2、后在路径前加了file:///,问题解决了。
TestXML t = new TestXML("file:///E:/a1.html");
除了这个原因之外,路径中如果有中文或者空格,也可能导致这个异常。
java.net.MalformedURLException: unknown protocol: e
1、当我用绝对路径时,报上面的错误,
TestXML t = new TestXML("E:/a1.html");
2、后在路径前加了file:///,问题解决了。
TestXML t = new TestXML("file:///E:/a1.html");
除了这个原因之外,路径中如果有中文或者空格,也可能导致这个异常。