JAVA学习笔记。 import java.util. * ; // 获取当前虚拟机的环境变量。 public class SystemInfo ... { public static void main(String[] args) ...{ Properties pro = System.getProperties(); Enumeration e= pro.propertyNames(); while(e.hasMoreElements()) ...{ String key = (String) e.nextElement(); System.out.println(key+" = "+pro.getProperty(key)); } }} // Properties为hashTable的一种特殊形式。