日期:2014-05-18  浏览次数:20704 次

这个返回系统绝对根路径的方法谁跟我详细讲下
public static final String getRootPath() {
String path = Constants.class.getResource("/").toString();
return path.substring(6, path.length()).replace("%20", " ");
}

这里两句时什么意思啊,还有%20

------解决方案--------------------
获取class所在文件路径,截取硬盘路径,%20是空格的显示,所以要还原。