java - Editing properties files w/o losing formatting -
i have properties (java world) file comments , key=value. want take backup of file , edit few key=value. need edit key in loop number of keys not fixed , key names differ partly not problem, struggling know how maintain format of file (comments, spaces)?
# abc system admin database abc_jdbc.password=5667p7jil7k221j+dmnvq== # xyz system admin database xyz_jdbc.password=489slp7jil7k221j+lmnvq==
and on......
properties jdk not remember previous state. can use other library it, example commons configuration
Comments
Post a Comment