************การใช้งานและ List ******************
// add by pradoem 2010-10-23
String SSL_FILE_PATH = PropertyUtil.getProperty("PROXY_CONFIG_EURO","PROXY_SSL_PATH");
String SSL_PASSWORD = PropertyUtil.getProperty("PROXY_CONFIG_EURO","PROXY_SSL_PASSWORD");
java.util.Properties props= System.getProperties();
//java.util.Properties props= new java.util.Properties(System.getProperties());
props.put("javax.net.ssl.trustStore",SSL_FILE_PATH);
props.put("javax.net.ssl.trustStorePassword",SSL_PASSWORD);
//remark by pradoem
props.put("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
//remark by pradoem
java.util.Properties newprops = new java.util.Properties(props);
System.setProperties(newprops);
//System.setProperties(props);
PrintTest.printProproties();
**************Method show Properties System ของ JVM ****************
public static void printProproties()
{
Properties pr = System.getProperties();
TreeSet propKeys = new TreeSet(pr.keySet()); // TreeSet sorts keys
int i = 1;
for (Iterator it = propKeys.iterator(); it.hasNext(); ) {
String key = (String)it.next();
System.out.println(i+": "+key +"="+ pr.get(key));
i++;
}
System.out.println("test:"+pr.size());
}
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
ไม่มีความคิดเห็น:
แสดงความคิดเห็น