--类加载.properties文件的方法
InputStream in = class(class加载文件的类名).class.getClassLoader().getResourceAsStream("a.properties");
--用Iterator读取.properties文件内容
Properties p=new Properties();
InputStream in = class(class加载文件的类名).class.getClassLoader().getResourceAsStream("a.properties");
p.load(in);
Iterator<String> its=p.stringPropertyNames().iterator();
while (its.hasNext()) {
System.out.println(its.next());
}