You can use this code to get the system properties:
import java.util.Properties;
import java.util.Enumeration;
Properties props = System.getProperties();
Enumeration propNames = props.propertyNames();
for (; propNames.hasMoreElements();) {
String key = propNames.nextElement().toString();
System.out.println(key + " : " + props.getProperty(key));
}
You can also get the environment information from System.getEnv().