import java.util.Enumeration;
import java.util.Properties;
import java.io.*;

public class Pro02 {

 public static void main(String[] args) {
  Properties props = new Properties();
  try {  
   FileInputStream fis = new FileInputStream("C:\\Program Files\\Xinox Software\\JCreator LE\\MyProjects\\Pro01\\db.properties");  
   props.load(fis);
   Enumeration enum = props.keys();
   while (enum.hasMoreElements()) {
    String key = (String) enum.nextElement();
    String val = (String) props.get(key);
    System.out.println(key + " = " + val);
   }
  } catch(Exception e)
  {
  }
 }
}

'Programming > JAVA' 카테고리의 다른 글

[펌] 다형성의 이해  (0) 2005.08.18
[펌] 생성자와 THIS  (0) 2005.08.18
[펌] [SWING]JFileChooser  (0) 2005.06.29
[펌] 서버 소켓 예제  (0) 2005.06.24
[펌] 클라이언트 소켓  (0) 2005.06.24

Posted by 영웅기삼
,