Here is a far and away superior solution: use java.util.Properties
to handle your propertiesconfiguration file. Properties
supports a key=value
syntax that is very similar to the one you are trying to parse. It's up to you to decide whether that syntax is close enough to handle any existing configuration files you might have, and whether the validation and logging in your current code are essential.
CARVIEW |
Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams Here is a far and away superior solution: use java.util.Properties
to handle your properties file.
Here is a far and away superior solution: use java.util.Properties
to handle your configuration file. Properties
supports a key=value
syntax that is very similar to the one you are trying to parse. It's up to you to decide whether that syntax is close enough to handle any existing configuration files you might have, and whether the validation and logging in your current code are essential.
Here is a far and away superior solution: use java.util.Properties
to handle your properties file.