Java examples for java.lang:System
print Environment
//package com.java2s; import java.util.Map; public class Main { public static void main(String[] argv) throws Exception { printEnvironment();//from w ww . j a va 2 s . co m } public static void printEnvironment() { Map<String, String> env = System.getenv(); for (String key : env.keySet()) { System.out.println(key.toString() + ":\n\t'" + env.get(key) + "'"); } } }