Menu
Topics Index
...
`


Exploring java.lang > System >
Siva Nookala - 06 Oct 2016
In Environment Properties, we examined the way an application can use Properties objects to maintain its configuration. The Java platform itself uses a Properties object to maintain its own configuration.

The following properties are available in all cases.
KeyMeaning
file.separatorCharacter that separates components of a file path. This is "/" on UNIX and "\" on Windows.
java.class.pathPath used to find directories and JAR archives containing class files. Elements of the class path are separated by a platform-specific character specified in the path.separator property.
java.homeInstallation directory for Java Runtime Environment (JRE).
java.vendorJRE vendor name.
java.vendor.urlJRE vendor URL.
java.versionJRE version number.
line.separatorSequence used by operating system to separate lines in text files.
os.archOperating system architecture.
os.nameOperating system name.
os.versionOperating system version.
path.separatorPath separator character used in java.class.path.
user.dirUser working directory.
user.homeUser home directory.
user.nameUser account name.
getProperty(String which, String default)Returns the property associated with which. If the desired property is not found, default is returned
getProperty(String which)Returns the property associated with which. A null object is returned if the desired property is not found.
setProperty(String which, String v)Assigns the value v to the property named which.
clearProperty(String which)Deletes the environmental variable specified by which. The previous value associated with which is returned

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App