-1

This question is not specifically related Git. I want to create a properties/configuration file in Java with groups (similar to .gitconfig). For example, I want to group the properties as follows

[group1]
prop1=value1
prop2=value2

[group2]
prop1=value1
prop3=value3

Instead of

group1.prop1=value1
group1.prop2=value2
group2.prop1=value1
group2.prop3=value3

I researched internet thoroughly but didn't find anything related to grouping of properties. May be I am not searching with right keywords. Excuse me if I may have missed something online.

Thanks

TriCore
  • 1,844
  • 1
  • 16
  • 17

1 Answers1

0

It is the same format used by the windows "ini" files. There is a niche Java Library for that.

See: What is the easiest way to parse an INI file in Java?

Community
  • 1
  • 1
d0x
  • 11,040
  • 17
  • 69
  • 104