public static void put(String key,String value) throws Exception {
  Map<String,String> environemnt=new HashMap<String,String>(System.getenv());
  environemnt.put(key,value);
  updateEnvironment(environemnt);
}

public static void put ( String key , String value ) throws Exception { Map < String , String > environemnt = new HashMap < String , String > ( System . getenv ( ) ) ; environemnt . put ( key , value ) ; updateEnvironment ( environemnt ) ; }
allows dynamic update to the environment variables .
