Finish reading system-properties with System.getProperty("..")
java.lang.System
Some of the existing systemproperties:
file.separator | The fileseperator, also the separation mark between the elements of a pathname |
java.class.version | The version of the Java-class library |
java.class.path | The current path to the classes (classpath) |
java.io.tmpdir | The temporary directory |
java.vendor | editor of the Java-version |
java.vendor.url | A link to edit |
java.version | The Java-version |
line.separator | The sign for line foldings |
os.arch | operating system architecture |
os.name | The name of the operating system |
path.separator | separators for the drive mechanism-statement in a pathname |
user.dir | The current work directory of the user |
user.home | The home-directory of the user |
user.language | The language which is setted at the user |
user.name | The username |
All properties can be handed out by the following Code:
import java.util.*; public class ShowSystemProperties { public static void main(String[] args) { Properties props = System.getProperties(); Enumeration names = props.propertyNames(); while (names.hasMoreElements()) { String name = (String)names.nextElement(); System.out.println(name + "=" + System.getProperty(name)); } } }
Key words:
temporary directory folder user system properties path version home user line-foldings file separator username language