A better class to update property files?

后端 未结 8 1999
不思量自难忘°
不思量自难忘° 2020-12-01 10:27

Though java.util.properties allows reading and writing properties file, the writing does not preserve the formatting. Not surprising, because it is not tied to

8条回答
  •  情歌与酒
    2020-12-01 10:46

    You can have a look to the Apache Commons Configuration, that contains PropertiesConfiguration class. However, as I have never used it, I don't know if it preserves the comments and formatting...

    However, it worthes a try...

提交回复
热议问题