どんなアプリでもたいてい使うので。
staticな場合は「this→クラス名.class」。
private Properties load(String filename) throws IOException {
Properties props = new Properties();
InputStream in = null;try {
ClassLoader cloader = Thread.currentThread().getContextClassLoader();if (cloader == null) {
cloader = this.getClass().getClassLoader();
}in = cloader.getResourceAsStream(filename);
props.load(in);
} finally {
if (in != null) {
in.close();
}
}return props;
}