import java.util.Properties; import java.io.FileInputStream; import java.io.IOException; class Program01 { public static void main(String args[]) { Options op = new Options(); op.oLoad(); } } class Options { public void oLoad() { Properties pro = new Properties(); try { pro.load(getClass().getClassLoader().getResourceAsStream("config.properties")); System.out.println(pro.getProperty("Első")); System.out.println(pro.getProperty("Második")); }catch(IOException e) { System.err.println("Hiba a betöltés során!"); } } }