scala

# sys

#### package sys

The package object `scala.sys` contains methods for reading and altering core aspects of the virtual machine as well as the world outside of it.

Version

  2.9

Since

  2.9

Visibility

1. Public
2. All

### Type Members

1. #### trait BooleanProp extends Prop[Boolean]

   A few additional conveniences for Boolean properties.

2. #### trait Prop[+T] extends AnyRef

   A lightweight interface wrapping a property contained in some unspecified map.

3. #### class ShutdownHookThread extends Thread

   A minimal Thread wrapper to enhance shutdown hooks.

4. #### class SystemProperties extends Map[String, String]

   A bidirectional map wrapping the java System properties.

### Value Members

1. #### object BooleanProp extends AnyRef

2. #### object Prop extends AnyRef

3. #### object ShutdownHookThread extends AnyRef

4. #### object SystemProperties extends AnyRef

   The values in SystemProperties can be used to access and manipulate designated system properties.

5. #### def addShutdownHook(body: ⇒ Unit): ShutdownHookThread

   Register a shutdown hook to be run when the VM exits.

   Register a shutdown hook to be run when the VM exits. The newly created thread is marked as a daemon so it will not interfere with VM shutdown. The hook is automatically registered: the returned value can be ignored, but is available in case the Thread requires further modification. It can also be unregistered by calling ShutdownHookThread#remove().

   Note that shutdown hooks are NOT guaranteed to be run.

   returns

     the Thread which will run the shutdown hook.

   Definition Classes
     package

6. #### def allThreads(): IndexedSeq[Thread]

   Returns all active thread in the current thread's thread group and subgroups.

   Returns all active thread in the current thread's thread group and subgroups.

   returns

     an IndexedSeq containing the threads.

   Definition Classes
     package

7. #### def env: Map[String, String]

   An immutable Map representing the current system environment.

   An immutable Map representing the current system environment.

   returns

     a Map containing the system environment variables.

   Definition Classes
     package

8. #### def error(message: String): Nothing

   Throw a new RuntimeException with the supplied message.

   Throw a new RuntimeException with the supplied message.

   returns

     Nothing.

   Definition Classes
     package

9. #### def exit(status: Int): Nothing

   Exit the JVM with the given status code.

   Exit the JVM with the given status code.

   returns

     Nothing.

   Definition Classes
     package

10. #### def exit(): Nothing

    Exit the JVM with the default status code.

    Exit the JVM with the default status code.

    returns

      Nothing.

    Definition Classes
      package

11. #### package process

    This package handles the execution of external processes.

12. #### def props: SystemProperties

    A bidirectional, mutable Map representing the current system Properties.

    A bidirectional, mutable Map representing the current system Properties.

    returns

      a SystemProperties.

    Definition Classes
      package
    See also

      `scala.sys.SystemProperties`

13. #### def runtime: Runtime

    A convenience method to get the current Runtime instance.

    A convenience method to get the current Runtime instance.

    returns

      the result of `java.lang.Runtime.getRuntime()`

    Definition Classes
      package