public static void getSystemEnvironmentMap() {
Map envmap = System.getenv();
Set> set = envmap.entrySet();
Iterator> iterator = set.iterator();
while (iterator.hasNext()) {
Entry entry = iterator.next();
System.out.println(entry.getKey());
System.out.println(entry.getValue());
}
}
This will return all environment variables
No comments:
Post a Comment