如何显示所有的操作系统环境变量 :

import java.util.Map;

public class ShowEnvironmentVariables {
    public static void main(String[] args) {
        for (Map.Entry entry : System.getenv().entrySet()) {
            System.out.println(entry.getKey() + ": " + entry.getValue());
        }
    }
}

posted @ 2015-10-24 19:55  awayaaaaaaaa  阅读(220)  评论(0编辑  收藏  举报