-
Notifications
You must be signed in to change notification settings - Fork 968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse String[] args commandline parameter #55
Comments
You can do "-Ddb.user=muki" right now (as args to the jvm) - would that meet the need? What is the extra advantage of doing it this way? |
We are currently using Args4J to parse our application arguments. We would have to port all our application arguments to system properties. Besides that, system properties and application arguments are different things. Parsing arrays also provide an easier syntax to create a config on the fly. E.g. String[] params = new String[] {"db.user", "muki", "db.password", "secret"};
ConfigFactory.parseArray(params); These aren't very strong reason or common issues, but would be nice to have. |
(going through bugs) I think a command line parser is too much of its own complicated problem to bundle with a config library; what I'd probably do to handle this is take some command line parser lib, and write some glue from it to the config lib. Which sounds useful, but I think it's out of scope for this particular jar. |
Yeah, I think you are right. For that I created a small library Config4CLI to close this gap. |
A nice feature would be to parse commandline parameters. E.g.
If there is any interest, I would try to provide an implementation.
The text was updated successfully, but these errors were encountered: