That really isnt an option, since everything in the site operates around this config file, it is also tied in with other sites, that would be too much work to fix all sites. Thats why I am trying to create a workaround.
- The configuration files in java are usually properties file, which are simply a list of key,value pairs. Property files does not support multiple sections.
<jdk_install_dir>/jre/lib has several property files that are used by java itself.
Please take a look at http://java.sun.com/docs/books/tutorial/essential/environment/properties.html which has code snippets on reading property files.
As long as the key values are unique, you should use the recommended properties file mechanism. (You can still use comments to break the keys into different sections for human readability but a given key should only occur once in the file; otherwise only the last one will be read and the others will be ignored).
- The above will break if there can be multiple keys with same value. For instance, if your config file has windows ini file type construct, then property files cannot be used. (In your own example, the keys are unique; so property files should work. But if section [x] can also have a variableA defined along with section [a], property files wont work).
In such a case, you should consider defining your keys as section_keyname and then determine the section in code. Or you could have multiple property files for different sections. Or you may want to check out open-source programs like http://ini4j.sourceforge.net/index.html