Return all system properties in Java
Description
The following code shows how to return all system properties.
The return value is a java.util.Properties object. The Properties class is a subclass of java.util.Hashtable.
Example
/*from ww w . j a v a 2 s .c o m*/
public class Main {
public static void main(String[] args) {
java.util.Properties properties = System.getProperties();
properties.list(System.out);
}
}
The code above generates the following result.