package baseClass7;

import java.io.IOException;

public class RuntimeTest {
public static void main(String[] args) {
// 获取Java程序关联的运行时对象
Runtime rt = Runtime.getRuntime();
System.out.println("处理其数量:" + rt.availableProcessors());
System.out.println("空闲时内存:" + rt.freeMemory());
System.out.println("可用的最大是内存数:" + rt.maxMemory());
try {
rt.exec("notepad.exe");// 打开记事本
} catch (IOException e) {
// System.out.println(e);
e.printStackTrace();
}
}
}