|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Runtime
Method Summary | |
Process |
exec(String command)
Executes the system command specified in the parameter. |
Process |
exec(String[] cmdarray)
Executes the system command specified by cmdarray[0] with arguments specified by the strings in the rest of the array. |
Process |
exec(String[] cmdarray,
String[] envp)
Executes the system command specified by cmdarray[0] with arguments specified by the strings in the rest of the array. |
Process |
exec(String command,
String[] envp)
Executes the system command specified in the parameter. |
void |
exit(int status)
Exits the virtual machine with an exit code. |
long |
freeMemory()
Returns the number of free bytes in system memory. |
void |
gc()
Runs the garbage collector. |
InputStream |
getLocalizedInputStream(InputStream in)
Localize an input stream. |
OutputStream |
getLocalizedOutputStream(OutputStream out)
Localize an output stream. |
static Runtime |
getRuntime()
Returns the runtime. |
void |
load(String filename)
Loads a dynamic library, given a complete path name. |
void |
loadLibrary(String libname)
Loads a dynamic library with the specified library name. |
void |
runFinalization()
Runs the finalization methods of any objects pending finalization. |
long |
totalMemory()
Returns the total number of bytes in system memory. |
void |
traceInstructions(boolean on)
Enables/Disables tracing of instructions. |
void |
traceMethodCalls(boolean on)
Enables/Disables tracing of method calls. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static Runtime getRuntime()
public void exit(int status)
status
- exit status, 0 if successful, other values indicate
various error types.public Process exec(String command) throws IOException
command
- a specified system command
IOException
public Process exec(String command, String[] envp) throws IOException
command
- a specified system command
IOException
public Process exec(String[] cmdarray) throws IOException
IOException
public Process exec(String[] cmdarray, String[] envp) throws IOException
envp
- array containing environment in format name=value
IOException
public long freeMemory()
public long totalMemory()
public void gc()
public void runFinalization()
public void traceInstructions(boolean on)
on
- start tracing if truepublic void traceMethodCalls(boolean on)
on
- start tracing if truepublic void load(String filename)
Runtime.getRuntime().load("/home/avh/lib/libX11.so");
filename
- the file to load
UnsatisfiedLinkError
- If the file does not exist.getRuntime()
public void loadLibrary(String libname)
libname
- the name of the library
UnsatisfiedLinkError
- If the library does not exist.public InputStream getLocalizedInputStream(InputStream in)
public OutputStream getLocalizedOutputStream(OutputStream out)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |