package joeho.net.csdn.blog;
import java.util.*;
public class TestProperties {
/**
* Method main
*
*
* @param args
*
*/
public static void main(String[] args) {
Properties sp = System.getProperties();
Enumeration em = sp.propertyNames();
while(em.hasMoreElements())
{
String key =(String)em.nextElement();
System.out.println(key+"="+sp.getProperty(key));
}
Process P = null;
try{
P=Runtime.getRuntime().exec("notepad.exe TestProperties.java");
Thread.sleep(5000);
P.destroy();
}catch(Exception e){e.printStackTrace();}
}
}