This class defines a platform-independent interface to system facilities, including system properties and system input and output streams. All methods and variables of this class are static, and the class cannot be instantiated. Because the methods defined by this class are low-level system methods, most require special permissions and cannot be executed by untrusted code.

getProperty( ) looks up a named property on the system properties list, returning the optionally specified default value if no property definition is found. getProperties( ) returns the entire properties list. setProperties( ) sets a Properties object on the properties list. In Java 1.2 and later, setProperty( ) sets the value of a system property. In Java 5.0, you can clear a property setting with clearProperty( ) . The following table lists system properties that are always defined. Untrusted code may be unable to read some or all of these properties. Additional properties can be defined using the -D option when invoking the Java interpreter.

Property name



Platform directory separator character


Platform path separator character


Platform line separator character(s)

Current user s account name


Home directory of current user


The current working directory


Where classes are loaded from


Version of the Java class file format

java.compiler ...

Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.