Example usage for Java java.lang Runtime fields, constructors, methods, implement or subclass
The text is from its open source code.
Version | version |
void | addShutdownHook(Thread hook) Registers a new virtual-machine shutdown hook. |
int | availableProcessors() Returns the number of processors available to the Java virtual machine. |
Process | exec(String command) Executes the specified string command in a separate process. |
Process | exec(String cmdarray[]) Executes the specified command and arguments in a separate process. |
Process | exec(String command, String[] envp) Executes the specified string command in a separate process with the specified environment. |
Process | exec(String[] cmdarray, String[] envp) Executes the specified command and arguments in a separate process with the specified environment. |
Process | exec(String command, String[] envp, File dir) Executes the specified string command in a separate process with the specified environment and working directory. |
Process | exec(String[] cmdarray, String[] envp, File dir) Executes the specified command and arguments in a separate process with the specified environment and working directory. |
void | exit(int status) Terminates the currently running Java virtual machine by initiating its shutdown sequence. |
long | freeMemory() Returns the amount of free memory in the Java Virtual Machine. |
void | gc() Runs the garbage collector in the Java Virtual Machine. |
Runtime | getRuntime() Returns the runtime object associated with the current Java application. |
void | halt(int status) Forcibly terminates the currently running Java virtual machine. |
void | load(String filename) Loads the native library specified by the filename argument. |
void | loadLibrary(String libname) Loads the native library specified by the libname argument. |
long | maxMemory() Returns the maximum amount of memory that the Java virtual machine will attempt to use. |
boolean | removeShutdownHook(Thread hook) De-registers a previously-registered virtual-machine shutdown hook. |
void | runFinalization() Runs the finalization methods of any objects pending finalization. |
long | totalMemory() Returns the total amount of memory in the Java virtual machine. |