import java.io.FileInputStream; import java.io.IOException; import java.util.Properties; public class Main { public static void main(String[] argv) throws Exception { Properties properties = new Properties(); try { properties.load(new FileInputStream("filename.properties")); } catch (IOException e) { } String string = properties.getProperty("a.b"); properties.setProperty("a.b", "new value"); } }