How to parse ini file with sections in Java?
问题 Here is a sample ini file: [link#1] alias=My Link 1 link=https://www.yandex.ru/ [link#2] alias=My Link 2 link=https://mail.ru/ [link#3] alias=My Link 3 link=http://point.md/ru/ I've seen how to parse it, but the keys are the same, and I need to get this into lets say ArrayList<LinkObject> . Does anyone know a good solution for this? Or shall we format the .ini file differently? 回答1: I can suggest you ini4j. This is small and very easy to use library. Just download files or include dependency