2007-07-21 17:50:26 +00:00
|
|
|
package java.lang;
|
|
|
|
|
|
|
|
public class Runtime {
|
|
|
|
private static final Runtime instance = new Runtime();
|
|
|
|
|
|
|
|
private Runtime() { }
|
|
|
|
|
|
|
|
public static Runtime getRuntime() {
|
|
|
|
return instance;
|
|
|
|
}
|
|
|
|
|
2007-09-12 01:13:05 +00:00
|
|
|
public void load(String path) {
|
|
|
|
if (path != null) {
|
|
|
|
load(path, false);
|
|
|
|
} else {
|
|
|
|
throw new NullPointerException();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public void loadLibrary(String path) {
|
|
|
|
if (path != null) {
|
|
|
|
load(path, true);
|
|
|
|
} else {
|
|
|
|
throw new NullPointerException();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private static native void load(String name, boolean mapName);
|
2007-07-21 17:50:26 +00:00
|
|
|
|
|
|
|
public native void gc();
|
|
|
|
|
|
|
|
public native void exit(int code);
|
2007-07-27 02:39:53 +00:00
|
|
|
|
|
|
|
public native long freeMemory();
|
2007-07-21 17:50:26 +00:00
|
|
|
}
|