Here you can find the source of loadProperties(File file)
public static Properties loadProperties(File file)
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Properties; public class Main { public static Properties loadProperties(File file) { Properties prop = new Properties(); try {/* w ww . j a v a 2 s .com*/ InputStream in = new FileInputStream(file); prop.load(in); in.close(); } catch (IOException e) { e.printStackTrace(); } return prop; } }