public static Runtime getRuntime() //返回Runtime类的实例。
public void exit(int status) //终止当前的虚拟机。
public native int availableProcessors() //当前可用处理器数量。
public void addShutdownHook(Thread hook) //注册新的钩子线程,在虚拟机关闭之前执行。
public boolean removeShutdownHook(Thread hook) //删除钩子线程
public Process exec(String command)throws IOException //在单独的进程中执行给定的命令。
public int availableProcessors() //返回可用的处理器的编号,单位bytes。
public long freeMemory() //返回JVM中的可用内存量,单位bytes。
public long totalMemory() //返回JVM中的总内存量,单位bytes。
Java Runtime类的重要方法
最新推荐文章于 2024-04-02 22:31:23 发布