Coder Social home page Coder Social logo

Comments (4)

havocp avatar havocp commented on July 24, 2024

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?

from config.

muuki88 avatar muuki88 commented on July 24, 2024

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.

from config.

havocp avatar havocp commented on July 24, 2024

(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.

from config.

muuki88 avatar muuki88 commented on July 24, 2024

Yeah, I think you are right. For that I created a small library Config4CLI to close this gap.

from config.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.