Here you can find the source of loadProperties(String file)
public static Properties loadProperties(String file)
//package com.java2s; /*//ww w. jav a2 s . co m * Scorpio4 - Apache Licensed * Copyright (c) 2009-2014 Lee Curtis, All Rights Reserved. * * */ import java.io.*; import java.util.*; public class Main { public static Properties loadProperties(String file) { try { Properties properties = new Properties(); InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(file); if (in != null) properties.load(in); return properties; } catch (IOException e) { return null; } } }