Here you can find the source of loadProperties(Properties p, String progname)
public static void loadProperties(Properties p, String progname)
//package com.java2s; //License from project: Open Source License import java.io.*; import java.util.*; public class Main { public static void loadProperties(Properties p, String progname) { String fileName = (progname + ".properties"); try {/*w w w . j a va 2 s . c o m*/ InputStream is = new FileInputStream(fileName); p.load(is); is.close(); } catch (IOException e) { System.err.println("Cannot read " + fileName); return; } } }