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();}
}
}
353

被折叠的 条评论
为什么被折叠?



