To find out about the current working environment, applets can read system properties. System properties are key/value pairs that contain information such as the operating system that the applet is running under. System properties are covered in detail in the Properties page.
Applets can read some, but not all, system properties.
Applets can read the following system properties:
Valid System Properties Key Meaning
File separator (for example, "/")
Java class version number
Java vendor-specific string
Java vendor URL
Java version number
Operating system architecture
Operating system name
Path separator (for example, ":")
To read a system property from within an applet, the applet uses the
getProperty. For example:The following applet reads all of the properties that are available to all applets:String newline = System.getProperty("line.separator");You can find the source code in
For security reasons, no existing browsers or applet viewers let applets read the following system properties.
Forbidden System Properties Key Meaning
Java installation directory
User's current working directory
User home directory
User account name