#12 ominaisuus valmis

This commit is contained in:
2026-05-11 03:54:34 +03:00
parent c52dbcd716
commit a29fb6d0f5
8 changed files with 71 additions and 7 deletions
+5 -5
View File
@@ -21,8 +21,9 @@ public class Main {
}
try {
properties = new Properties();
properties.load(Main.class.getClassLoader().getResourceAsStream("defaults.properties"));
Properties defaults = new Properties();
defaults.load(Main.class.getClassLoader().getResourceAsStream("defaults.properties"));
properties = new Properties(defaults);
properties.load(new FileInputStream(asetustiedosto));
}
catch (IOException e) {
@@ -30,9 +31,8 @@ public class Main {
e.printStackTrace();
}
properties.forEach((key, value) -> {
System.out.println(key + ": " + value);
});
System.out.println(properties.getProperty("version"));
System.out.println(properties.getProperty("viimeisinVersio"));
App.main();