Java

[JAVA] System 환경변수 읽어오기 샘플

제끼나·2014년 3월 22일·조회 6,108

import java.util.*; 

 public class SystemPropertyTest {

 
        public static void main(String[] args) {
                Properties prop = System.getProperties();
                String key;
                for (Enumeration e = prop.propertyNames() ; e.hasMoreElements() ;) {
                 key = (String)e.nextElement();
                 System.out.println(key + "=" + prop.get(key));
                
             }
        }

}

댓글 0

로그인 후 댓글을 남길 수 있습니다.

아직 댓글이 없습니다.