我在 RAD 中收到以下错误:
java.net.URISyntaxException: Illegal character in path at index 16: file:/E:/Program Files/IBM/SDP/runtimes/base......
您能让我知道错误是什么以及如何解决吗?
索引 16 处有一个非法字符。我想说它不喜欢路径中的空格。你可以百分比编码 http://en.wikipedia.org/wiki/Percent-encoding特殊字符,如空格。在本例中将其替换为 %20。
我上面链接的问题建议使用URL编码器 http://download.oracle.com/javase/6/docs/api/java/net/URLEncoder.html:
String thePath = "file://E:/Program Files/IBM/SDP/runtimes/base";
thePath = URLEncoder.encode(thePath, "UTF-8");
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)