Live-Code Quickstart
Get started by trying live code examples in Replit
Last updated
Was this helpful?
Get started by trying live code examples in Replit
Last updated
Was this helpful?
Let's get started! Below is a live demo REPL that is ready to run five simple demos. Go ahead and click the Green run button.
If you haven't already, go ahead and click the green run button at the top of the REPL window above.
Running this REPL compiles a small AndHow example, then runs it five times with different configurations. Take a look at the Main
class: It contains two AndHow Properties, NAME
& REPEAT_COUNT
. The values of these two Properties are used to print to System.out in the main method.
There is also an andhow.properties file - click the file icon on the left to see the list of files. The file has a value for both Properties. (You can click the file icon again to make the list go away).
Continue on to the Run 1 tab. . .
&?!
AndHow can load values from most configuration sources automatically, however, it has no way to intercept the command line arguments passed to the main method - the application has to help by passing them to AndHow. Read more about how works.
AndHow validates all configuration values at startup and throws a RuntimeExcpetion
to and prevent an application from running with invalid configuration. The validation errors and messages AndHow gives are very specific:
The has a suggested learning path - Happy trails!