API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.lang. Runtime View Source
Author(s)
unascribed
Since
JDK1.0
Version
1.78, 04/10/06
Serial
Hierarchy
 Object
      Runtime
Implements
Subclasses
Description
public class Runtime
  Every Java application has a single instance of class Runtime that allows the application to interface with the environment in which the application is running.
See also:    Runtime.getRuntime()
Constructors
private Runtime ()
Don't let anyone else instantiate this class
Methods
Hide/Show inherited methods
public void addShutdownHook (Thread hook)
  Registers a new virtual-machine shutdown hook.
publicnative int availableProcessors ()
  Returns the number of processors available to the Java virtual machine.
public Process exec (String command) throws IOException
  Executes the specified string command in a separate process.
public Process exec (String cmdarray) throws IOException
  Executes the specified command and arguments in a separate process.
public Process exec (String cmdarray, String envp) throws IOException
  Executes the specified command and arguments in a separate process with the specified environment.
public Process exec (String cmdarray, String envp, File dir) throws IOException
  Executes the specified command and arguments in a separate process with the specified environment and working directory.
public Process exec (String command, String envp) throws IOException
  Executes the specified string command in a separate process with the specified environment.
public Process exec (String command, String envp, File dir) throws IOException
  Executes the specified string command in a separate process with the specified environment and working directory.
public void exit (int status)
  Terminates the currently running Java virtual machine by initiating its shutdown sequence.
publicnative long freeMemory ()
  Returns the amount of free memory in the Java Virtual Machine.
publicnative void gc ()
  Runs the garbage collector.
@Deprecated
public InputStream getLocalizedInputStream (InputStream in)
  Creates a localized version of an input stream.
@Deprecated
public OutputStream getLocalizedOutputStream (OutputStream out)
  Creates a localized version of an output stream.
publicstatic Runtime getRuntime ()
  Returns the runtime object associated with the current Java application.
public void halt (int status)
  Forcibly terminates the currently running Java virtual machine.
public void load (String filename)
  Loads the specified filename as a dynamic library.
pack-privatesynchronized void load0 (Class fromClass, String filename)
public void loadLibrary (String libname)
  Loads the dynamic library with the specified library name.
pack-privatesynchronized void loadLibrary0 (Class fromClass, String libname)
publicnative long maxMemory ()
  Returns the maximum amount of memory that the Java virtual machine will attempt to use.
public boolean removeShutdownHook (Thread hook)
  De-registers a previously-registered virtual-machine shutdown hook.
public void runFinalization ()
  Runs the finalization methods of any objects pending finalization.
@Deprecated
publicstatic void runFinalizersOnExit (boolean value)
  Enable or disable finalization on exit; doing so specifies that the finalizers of all objects that have finalizers that have not yet been automatically invoked are to be run before the Java runtime exits.
publicnative long totalMemory ()
  Returns the total amount of memory in the Java virtual machine.
publicnative void traceInstructions (boolean on)
  Enables/Disables tracing of instructions.
publicnative void traceMethodCalls (boolean on)
  Enables/Disables tracing of method calls.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar