81,122
社区成员




1.FileInputStream in = null;
2.Properties properties = new Properties();
3.String classpath = null;
4.try{
5. classpath = Thread.currentThread().getContextClassLoader().getResource("/").toString();
6. classpath = classpath.substring(5);
7. in = new FileInputStream(classpath+"filename");
8. properties.load(in);
9.}catch (Exception e) {
10. System.err.println(classpath+"filename not found");
11. return false;
12.}