01.JAVA/Java2009. 12. 21. 18:10
반응형

Properties configProps = new Properties();
ClassLoader classLoader = ClassLoader.getSystemClassLoader();
InputStream inputStream = classLoader.getResourceAsStream(propertyFilePath);
configProps.load(inputStream);


------------------------------------------------



// 메일보낼사람 정보 가져오기
  // db.properties 가져오기 (* db.properties file은 DBCheckThread.class와 같은곳에  존재...)
  Properties properties = new Properties();
  InputStream inputstream = getClass().getResourceAsStream("/senduser.properties");
  properties.load(inputstream);
  String sendUser = properties.getProperty("mailuser");

  String toUser = "hanho9@nate.com";

Posted by 1010