Java tutorial
import java.net.URL; import java.util.Properties; public class Main { public static void main(String args[]) throws Exception { Properties props = new Properties(); URL url = ClassLoader.getSystemResource("props.properties"); props.load(url.openStream()); System.out.println("prop1 :\n " + props.get("prop1")); System.out.println("prop2 :\n " + props.get("prop2")); } }