This is something which I want to do in properties file
#Comments about key Value pair 1
Key_1=value_1
#Comments about key Value pair 2
Key_2=value_2
#Comments about key Value pair 3
Key_3=value_3
Right now what I am able to do with my file is
#OMG, It works!
#Mon Oct 14 01:22:10 IST 2013
Key_1=Value_1
Key_2=Value_2
Is there any way of doing such a thing
You can use the Apache Commons Configuration to write and read Properties files, specifically the setComment() function in a PropertiesConfigurationLayout which allows you to specify a comment for each property.
Note that above links refer to Commons Configuration v1.x, while v2.0 has been released in the meantime, which has different package names.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With