The exec() APIs must first do any required security checks, and then call org.apache.harmony.luni.internal.process.SystemProcess.create(). The Runtime interface.
Public Member Functions | |
Process | exec (String[] progArray) throws java.io.IOException |
Execute progArray[0] in a separate platform process The new process inherits the environment of the caller. | |
Process | exec (String[] progArray, String[] envp) throws java.io.IOException |
Execute progArray[0] in a separate platform process The new process uses the environment provided in envp. | |
Process | exec (String[] progArray, String[] envp, File directory) throws java.io.IOException |
Execute progArray[0] in a separate platform process. | |
Process | exec (String prog) throws java.io.IOException |
Execute program in a separate platform process The new process inherits the environment of the caller. | |
Process | exec (String prog, String[] envp) throws java.io.IOException |
Execute prog in a separate platform process The new process uses the environment provided in envp. | |
Process | exec (String prog, String[] envp, File directory) throws java.io.IOException |
Execute prog in a separate platform process The new process uses the environment provided in envp. | |
void | exit (int code) |
Causes the virtual machine to stop running, and the program to exit. | |
long | freeMemory () |
Answers the amount of free memory resources which are available to the running program. | |
void | gc () |
Indicates to the virtual machine that it would be a good time to collect available memory. | |
void | load (String pathName) |
Loads and links the library specified by the argument. | |
void | loadLibrary (String libName) |
Loads and links the library specified by the argument. | |
void | runFinalization () |
Provides a hint to the virtual machine that it would be useful to attempt to perform any outstanding object finalizations. | |
long | totalMemory () |
Answers the total amount of memory resources which is available to (or in use by) the running program. | |
void | traceInstructions (boolean enable) |
Turns the output of debug information for instructions on or off. | |
void | traceMethodCalls (boolean enable) |
Turns the output of debug information for methods on or off. | |
InputStream | getLocalizedInputStream (InputStream stream) |
OutputStream | getLocalizedOutputStream (OutputStream stream) |
void | addShutdownHook (Thread hook) |
Registers a new virtual-machine shutdown hook. | |
boolean | removeShutdownHook (Thread hook) |
De-registers a previously-registered virtual-machine shutdown hook. | |
void | halt (int code) |
Causes the virtual machine to stop running, and the program to exit. | |
int | availableProcessors () |
Return the number of processors, always at least one. | |
long | maxMemory () |
Return the maximum memory that will be used by the virtual machine, or Long.MAX_VALUE. | |
Static Public Member Functions | |
static Runtime | getRuntime () |
Return the single Runtime instance. | |
static void | runFinalizersOnExit (boolean run) |
Ensure that, when the virtual machine is about to exit, all objects are finalized. | |
Private Member Functions | |
Runtime () | |
Prevent this class from being instantiated. |
java.lang.Runtime.Runtime | ( | ) | [private] |
Prevent this class from being instantiated.
Process java.lang.Runtime.exec | ( | String[] | progArray | ) | throws java.io.IOException |
Execute progArray[0] in a separate platform process The new process inherits the environment of the caller.
progArray | the array containing the program to execute as well as any arguments to the program. |
java.io.IOException | if the program cannot be executed | |
SecurityException | if the current SecurityManager disallows program execution |
Process java.lang.Runtime.exec | ( | String[] | progArray, | |
String[] | envp | |||
) | throws java.io.IOException |
Execute progArray[0] in a separate platform process The new process uses the environment provided in envp.
progArray | the array containing the program to execute a well as any arguments to the program. | |
envp | the array containing the environment to start the new process in. |
java.io.IOException | if the program cannot be executed | |
SecurityException | if the current SecurityManager disallows program execution |
Process java.lang.Runtime.exec | ( | String[] | progArray, | |
String[] | envp, | |||
File | directory | |||
) | throws java.io.IOException |
Execute progArray[0] in a separate platform process.
The new process uses the environment provided in envp
progArray | the array containing the program to execute a well as any arguments to the program. | |
envp | the array containing the environment to start the new process in. | |
directory | the directory in which to execute progArray[0]. If null, execute in same directory as parent process. |
java.io.IOException | if the program cannot be executed | |
SecurityException | if the current SecurityManager disallows program execution |
Process java.lang.Runtime.exec | ( | String | prog | ) | throws java.io.IOException |
Execute program in a separate platform process The new process inherits the environment of the caller.
prog | the name of the program to execute |
java.io.IOException | if the program cannot be executed | |
SecurityException | if the current SecurityManager disallows program execution |
Process java.lang.Runtime.exec | ( | String | prog, | |
String[] | envp | |||
) | throws java.io.IOException |
Execute prog in a separate platform process The new process uses the environment provided in envp.
prog | the name of the program to execute | |
envp | the array containing the environment to start the new process in. |
java.io.IOException | if the program cannot be executed | |
SecurityException | if the current SecurityManager disallows program execution |
Process java.lang.Runtime.exec | ( | String | prog, | |
String[] | envp, | |||
File | directory | |||
) | throws java.io.IOException |
Execute prog in a separate platform process The new process uses the environment provided in envp.
prog | the name of the program to execute | |
envp | the array containing the environment to start the new process in. | |
directory | the initial directory for the subprocess, or null to use the directory of the current process |
java.io.IOException | if the program cannot be executed | |
SecurityException | if the current SecurityManager disallows program execution |
void java.lang.Runtime.exit | ( | int | code | ) |
Causes the virtual machine to stop running, and the program to exit.
If runFinalizersOnExit(true) has been invoked, then all finalizers will be run first.
code | the return code. |
SecurityException | if the running thread is not allowed to cause the vm to exit. |
long java.lang.Runtime.freeMemory | ( | ) |
Answers the amount of free memory resources which are available to the running program.
void java.lang.Runtime.gc | ( | ) |
Indicates to the virtual machine that it would be a good time to collect available memory.
Note that, this is a hint only.
void java.lang.Runtime.load | ( | String | pathName | ) |
Loads and links the library specified by the argument.
pathName | the absolute (ie: platform dependent) path to the library to load |
UnsatisfiedLinkError | if the library could not be loaded | |
SecurityException | if the library was not allowed to be loaded |
void java.lang.Runtime.loadLibrary | ( | String | libName | ) |
Loads and links the library specified by the argument.
libName | the name of the library to load |
UnsatisfiedLinkError | if the library could not be loaded | |
SecurityException | if the library was not allowed to be loaded |
void java.lang.Runtime.runFinalization | ( | ) |
Provides a hint to the virtual machine that it would be useful to attempt to perform any outstanding object finalizations.
static void java.lang.Runtime.runFinalizersOnExit | ( | boolean | run | ) | [static] |
Ensure that, when the virtual machine is about to exit, all objects are finalized.
Note that all finalization which occurs when the system is exiting is performed after all running threads have been terminated.
run | true means finalize all on exit. |
long java.lang.Runtime.totalMemory | ( | ) |
Answers the total amount of memory resources which is available to (or in use by) the running program.
void java.lang.Runtime.traceInstructions | ( | boolean | enable | ) |
Turns the output of debug information for instructions on or off.
enable | if true, turn trace on. false turns trace off. |
void java.lang.Runtime.traceMethodCalls | ( | boolean | enable | ) |
Turns the output of debug information for methods on or off.
enable | if true, turn trace on. false turns trace off. |
InputStream java.lang.Runtime.getLocalizedInputStream | ( | InputStream | stream | ) |
OutputStream java.lang.Runtime.getLocalizedOutputStream | ( | OutputStream | stream | ) |
void java.lang.Runtime.addShutdownHook | ( | Thread | hook | ) |
boolean java.lang.Runtime.removeShutdownHook | ( | Thread | hook | ) |
De-registers a previously-registered virtual-machine shutdown hook.
hook | the hook (a Thread) to de-register |
void java.lang.Runtime.halt | ( | int | code | ) |
Causes the virtual machine to stop running, and the program to exit.
Finalizers will not be run first. Shutdown hooks will not be run.
code | the return code. |
SecurityException | if the running thread is not allowed to cause the vm to exit. |
int java.lang.Runtime.availableProcessors | ( | ) |
Return the number of processors, always at least one.
long java.lang.Runtime.maxMemory | ( | ) |
Return the maximum memory that will be used by the virtual machine, or Long.MAX_VALUE.
Genereated on Tue Dec 9 14:09:47 2008 by Doxygen.
(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.