public class Runtime {
private static Runtime currentRuntime = new Runtime();
/**
* Returns the runtime object associated with the current Java application.
* Most of the methods of class <code>Runtime</code> are instance
* methods and must be invoked with respect to the current runtime object.
*
* @return the <code>Runtime</code> object associated with the current
* Java application.
*/
public static Runtime getRuntime() {
return currentRuntime;
}
/** Don't let anyone else instantiate this class */
private Runtime() {}
你要从实例入手呢 你先看看代码 不懂的话 你再问问 作者: chocolate 时间: 2012-1-5 19:15
你可以Runtime的源代码就可以了。Runtime的构造函数是私有的,从程序角度它是不允许你直接创建。如果你的Runtime可以随你创立,那JAVA程序的安全性将会大为降低。