scala.sys

package scala.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.

Attributes

Members list

Concise view

Type members

Classlikes

trait BooleanProp extends Prop[Boolean]

A few additional conveniences for Boolean properties.

A few additional conveniences for Boolean properties.

Attributes

Companion:
object
Source:
BooleanProp.scala
Graph
Supertypes
trait Prop[Boolean]
class Object
trait Matchable
class Any

Attributes

Companion:
trait
Source:
BooleanProp.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
trait Prop[+T]

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

A lightweight interface wrapping a property contained in some unspecified map. Generally it'll be the system properties but this is not a requirement.

See scala.sys.SystemProperties for an example usage.

Attributes

Companion:
object
Source:
Prop.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Prop

Attributes

Companion:
trait
Source:
Prop.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Prop.type

A minimal Thread wrapper to enhance shutdown hooks.

A minimal Thread wrapper to enhance shutdown hooks. It knows how to unregister itself.

Attributes

Companion:
object
Source:
ShutdownHookThread.scala
Graph
Supertypes
class Thread
trait Runnable
class Object
trait Matchable
class Any

Attributes

Companion:
class
Source:
ShutdownHookThread.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

A bidirectional map wrapping the java System properties.

A bidirectional map wrapping the java System properties. Changes to System properties will be immediately visible in the map, and modifications made to the map will be immediately applied to the System properties. If a security manager is in place which prevents the properties from being read or written, the AccessControlException will be caught and discarded.

Attributes

Companion:
object
Source:
SystemProperties.scala
Graph
Supertypes

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

The values in SystemProperties can be used to access and manipulate designated system properties. See scala.sys.Prop for particulars.

Attributes

Example:

if (!headless.isSet) headless.enable()
Companion:
class
Source:
SystemProperties.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Value members

Concrete methods

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

Register a shutdown hook to be run when the VM exits. 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.

Attributes

body

the body of code to run at shutdown

Returns:

the Thread which will run the shutdown hook.

See also:
Source:
package.scala

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.

Attributes

Returns:

an IndexedSeq containing the threads.

Source:
package.scala

An immutable Map representing the current system environment.

An immutable Map representing the current system environment.

If lookup fails, use System.getenv(_) for case-insensitive lookup on a certain platform. If that also fails, throw NoSuchElementException.

Attributes

Returns:

a Map containing the system environment variables.

Source:
package.scala
def error(message: String): Nothing

Throw a new RuntimeException with the supplied message.

Throw a new RuntimeException with the supplied message.

Attributes

Returns:

Nothing.

Source:
package.scala
def exit(): Nothing

Exit the JVM with the default status code.

Exit the JVM with the default status code.

Attributes

Returns:

Nothing.

Source:
package.scala
def exit(status: Int): Nothing

Exit the JVM with the given status code.

Exit the JVM with the given status code.

Attributes

Returns:

Nothing.

Source:
package.scala

A bidirectional, mutable Map representing the current system Properties.

A bidirectional, mutable Map representing the current system Properties.

Attributes

Returns:

a SystemProperties.

See also:
Source:
package.scala

A convenience method to get the current Runtime instance.

A convenience method to get the current Runtime instance.

Attributes

Returns:

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

Source:
package.scala