private static void processLinesOfEnvironmentVariables ( BufferedReader reader , Properties properties ) throws IOException { String line = reader . readLine ( ) ; while ( null != line ) { int index = line . indexOf ( ' ' ) ; if ( - 1 == index && line . length ( ) != 0 ) { String message = "Skipping line - could not find '=' in line: '" + line + "'" ; System . err . println ( message ) ; } else { String name = line . substring ( 0 , index ) ; String value = line . substring ( index + 1 , line . length ( ) ) ; properties . setProperty ( name , value ) ; } line = reader . readLine ( ) ; } }
Process the lines of the environment variables returned .