System.getProperties();//获取系统配置相关的信息
Thread.currentThread().getThreadGroup();//获取当前系统运行的线程相关信息
Runtime//获取物理信息,包括内存等信息
//获取系统配置相关的信息 Properties ps=System.getProperties(); Iterator<Object> it=ps.keySet().iterator(); while(it.hasNext()){ String key=it.next().toString(); Object obj=ps.get(key); System.out.println(key+"->"+obj); } //获取当前系统运行的线程相关信息 ThreadGroup tg=Thread.currentThread().getThreadGroup(); System.out.println(tg.activeCount()); System.out.println(tg.getMaxPriority()); System.out.println(tg.getName()); //获取物理信息,包括内存等信息 Runtime rt=Runtime.getRuntime(); System.out.println(rt.freeMemory()); System.out.println(rt.maxMemory()); System.out.println(rt.totalMemory());