Here you can find the source of loadConfigProps(String configFile)
public static void loadConfigProps(String configFile) throws FileNotFoundException, IOException
//package com.java2s; //License from project: Apache License import java.io.BufferedReader; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; import java.util.HashMap; public class Main { private static HashMap<String, String> configProps = new HashMap<String, String>(); public static void loadConfigProps(String configFile) throws FileNotFoundException, IOException { // open up the config file and get the remaining parms BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(configFile))); try {//from w ww . jav a2s .c om String line; while ((line = br.readLine()) != null) { String[] strArray = line.split("="); if (strArray.length != 2) continue; String prop = strArray[0]; String val = strArray[1]; configProps.put(prop, val); } } catch (IOException e) { e.printStackTrace(); } finally { br.close(); } } }