读properties
InputStream is = Main.class.getClassLoader().getResourceAsStream("javaLearn/configure.properties");
System.out.println(is);
Properties props = new Properties();
try {
props.load(is);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String name = props.getProperty("name");
原文:http://www.cnblogs.com/anjuncc/p/5240777.html