Properties m_props = new Properties();
String urlpath = Thread.currentThread().getContextClassLoader()
.getResource("").getPath();
if (urlpath.contains("%20")) {
urlpath = urlpath.replaceAll("%20", " ");
}
String path = urlpath + "文件名";
try {
m_props.load(new FileInputStream(path));
} catch (Exception e) {
e.printStackTrace();
}
String property2 = m_props.getProperty("属性名");
String replaceAll = property2.replaceAll("/", "\\\\");