package test;
import java.util.Enumeration;
import java.util.Properties;
/**
* 描述:取得当前的系统信息.
*/
public class GetSystemV {
public GetSystemV() {
Properties pro = System.getProperties();
System.out.println("dir is " + System.getProperty("user.dir"));
for (Enumeration enums = pro.propertyNames(); enums.hasMoreElements();) {
String item = (String) enums.nextElement();
System.out.println(item + ":" + System.getProperty(item));
}
}
public static void main(String[] args) {
new GetSystemV();
}
}
posted on 2007-10-31 14:36
末日风情 阅读(230)
评论(0) 编辑 收藏 所属分类:
java编程