Gets the current System properties
import java.util.Enumeration;
import java.util.Properties;
public class SystemExample {
public static void main(String[] args) {
Properties prop = System.getProperties();
Enumeration en = prop.keys();
while(en.hasMoreElements()){
String key = (String) en.nextElement();
String value = prop.getProperty(key);
System.out.println(key +" = "+value);
}
}
}
Tags: java.lang, java.lang.System, System, System examples
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Leave a Reply