Here you can find the source of loadProperties()
private static Properties loadProperties()
//package com.java2s; //License from project: Apache License import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Properties; public class Main { private final static String configFile = "src/jbehave/resources/config.properties"; private static Properties loadProperties() { InputStream in = null;//from ww w.j a v a2s . c o m Properties properties = new Properties(); try { in = new BufferedInputStream(new FileInputStream(configFile)); properties.load(in); } catch (IOException e) { e.printStackTrace(); } return properties; } }