81,092
社区成员
发帖
与我相关
我的任务
分享
public class A {
protected static Properties _props;
static {
_props = new Properties();
try {
_props.load(UserAdminEditor.class.getClassLoader().
getResourceAsStream("appl.properties"));
} catch (IOException e) {
String message = "文件读取失败!";
throw new RuntimeException(message);
}
}
protected String getProperty(String key) {
return _props.getProperty(key);
}
}