Here you can find the source of initEnv(String key, String value)
public static void initEnv(String key, String value)
//package com.java2s; //License from project: Apache License import java.util.Map; import java.util.prefs.Preferences; public class Main { public static void initEnv(String key, String value) { Preferences preferences = Preferences.systemRoot().node( "/ice_water"); if (key == null || "".equals(key.trim())) { key = "dev_java_mode"; }/*ww w .j a v a 2 s . c o m*/ preferences.put(key, value); } public static <K, V> Map<K, V> put(Map<K, V> map, K key, V value) { V valueOld = map.get(key); if (valueOld == null) { map.put(key, value); } return map; } }