找到资源文件位置后,获取里面的属性键值对
/*
*path需要加上合适的后缀,据自己的需要
*/
path=this.getClass().getResource("/").getPath()+"";
InputStream inputStream = new FileInputStream(path);
Properties properties = new Properties();
properties.load(inputStream);
inputStream.close();
String p1 = properties.getProperty("p1name");

被折叠的 条评论
为什么被折叠?



