Get all environment names and value in java
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
public class EnvDump {
public static void main(String args[]) throws Exception {
Set s = System.getProperties().entrySet();
for (Iterator i = s.iterator(); i.hasNext();) {
Map.Entry entry = (Map.Entry) i.next();
System.out.println(entry.getKey() + " ======" +
entry.getValue());
}
}
}