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.

Source
  package.scala
Version

  2.9

Since

  2.9

Linear Supertypes
AnyRef, Any
Content Hierarchy Learn more about scaladoc diagrams
Ordering

1. Alphabetic
2. By inheritance

Inherited

1. sys
2. AnyRef
3. Any

1. Hide All
2. Show all

Learn more about member selection
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 AbstractMap[String, String] with Map[String, String]

   A bidirectional map wrapping the java System properties.

### Value Members

1. #### object BooleanProp

2. #### object Prop

3. #### object ShutdownHookThread

4. #### object SystemProperties

   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.

   body

     the body of code to run at shutdown

   returns

     the Thread which will run the shutdown hook.

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.

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.

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

   Throw a new RuntimeException with the supplied message.

   Throw a new RuntimeException with the supplied message.

   returns

     Nothing.

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

   Exit the JVM with the given status code.

   Exit the JVM with the given status code.

   returns

     Nothing.

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

    Exit the JVM with the default status code.

    Exit the JVM with the default status code.

    returns

      Nothing.

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.

    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()`

### Inherited from AnyRef

### Inherited from Any

### Ungrouped