Arguments
interface Arguments
Unlike JavaFX, starting a Glok application is the same as any other JVM based application. Declare a 'main' function, and call launch.
Glok does not parse the command-line arguments for you, but does supply two functions that you can use if you wish : posixArguments, doubleDashArguments Both return Arguments.
You can parse the command line in the main
method, or in Application.start, whichever is applicable to your needs. If you application works as a GUI as well as a command-line only program, it may even parse the arguments in both places.
There are a number of competing conventions for parsing command line arguments :
myProgram -fooValue // Use posixArguments()
myProgram --foo=Value // GNU's convention - no implementation supplied by Glok
myProgram --foo Value // Use doubleDashArguments()
Content copied to clipboard